File tree Expand file tree Collapse file tree 3 files changed +87
-0
lines changed Expand file tree Collapse file tree 3 files changed +87
-0
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < meta charset ="UTF-8 ">
5
+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6
+ < title > Circles Animation</ title >
7
+ < link rel ="stylesheet " href ="styles.css ">
8
+ </ head >
9
+ < body >
10
+ < div class ="container ">
11
+ < div class ="red circle "> </ div >
12
+ < div class ="green circle "> </ div >
13
+ < div class ="blue circle "> </ div >
14
+ </ div >
15
+
16
+ </ body >
17
+ </ html >
Original file line number Diff line number Diff line change
1
+ {
2
+ "artName" : " circles" ,
3
+ "githubHandle" : " MoaadAmer"
4
+ }
Original file line number Diff line number Diff line change
1
+ body {
2
+ margin : 0 ;
3
+ width : 100vw ;
4
+ height : 100vh ;
5
+ display : flex;
6
+ justify-content : center;
7
+ align-items : center;
8
+ }
9
+
10
+ .container {
11
+ width : 500px ;
12
+ height : 500px ;
13
+ display : flex;
14
+ flex-direction : column;
15
+ justify-content : center;
16
+ border : 3px solid black;
17
+ border-radius : 50% ;
18
+ }
19
+
20
+ .circle {
21
+ width : 2em ;
22
+ height : 2em ;
23
+ border-radius : 50% ;
24
+
25
+ animation-name : move;
26
+ animation-duration : 5s ;
27
+ animation-iteration-count : infinite;
28
+ animation-timing-function : linear;
29
+
30
+ }
31
+
32
+ .red {
33
+ background-color : red;
34
+ }
35
+
36
+ .green {
37
+ background-color : green;
38
+ }
39
+
40
+ .blue {
41
+ background-color : blue;
42
+ }
43
+
44
+ /* The animation code */
45
+ @keyframes move {
46
+ 0% {
47
+ translate : 10px 10px ;
48
+ }
49
+
50
+ 25% {
51
+ translate : 20px 20px ;
52
+ }
53
+
54
+ 50% {
55
+ translate : 30px 30px ;
56
+ }
57
+
58
+ 75% {
59
+ translate : 40px 40px ;
60
+ }
61
+
62
+ 100% {
63
+ translate : 50px 50px ;
64
+
65
+ }
66
+ }
You can’t perform that action at this time.
0 commit comments