-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathanimation.css
More file actions
143 lines (121 loc) · 2.35 KB
/
animation.css
File metadata and controls
143 lines (121 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
.outer{
height: 300vh;
background-image: linear-gradient(red, yellow, red);
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-around;
}
.card1{
height: 300px;
width: 300px;
border: 2px solid black;
}
.outer>.card1>.box1{
height: 100px;
width: 100px;
background-color: white;
animation: moving 1s ease-in infinite alternate ;
}
.card2{
height: 300px;
width: 300px;
background-color: black;
display: flex;
justify-content: center;
align-items: center;
animation: rotate 1s linear infinite;
}
.card2>.box2{
border: 1px solid white;
height: 100px;
width: 100px;
animation: rotate 1s linear infinite;
}
.card3{
height: 300px;
width: 300px;
background-color: black;
display: flex;
align-items: center;
justify-content: center;
}
.card3>.box3{
height: 100px;
width: 100px;
border-top: 3px solid green;
border-radius: 50%;
animation: rotate 1s linear infinite;
}
.card4{
height: 300px;
width: 300px;
border: 2px solid white;
border-radius: 50%;
animation: rotate 1s linear infinite;
}
.card4>.box4{
height: 100px;
width: 100px;
border: 2px solid white;
border-radius: 50%;
}
.card5{
height: 300px;
width: 300px;
display: flex;
gap: 20px;
justify-content: center;
}
.card5>.box{
height: 25px;
width: 25px;
border-radius: 50%;
background-color: white;
}
.card5>#ball1{
animation: moveY 1.5s ease-in infinite alternate;
}
.card5>#ball2{
animation: moveY 1.5s ease-in 0.1s infinite alternate;
background-color: blue;
}
.card5>#ball3{
animation: moveY 1.5s ease-in 0.2s infinite alternate;
background-color: brown;
}
.card5>#ball4{
animation: moveY 1.5s ease-in 0.3s infinite alternate;
background-color: green;
}
@keyframes moving {
from{
transform: translateX(0);
}
to{
transform: translateX(200px);
border-radius: 50%;
background-color: black;
}
}
@keyframes rotate {
from{
transform: rotate(0deg);
}
to{
transform: rotate(360deg);
}
}
@keyframes moveY {
from{
transform: translateY(0);
}
to{
transform: translateY(200px);
}
}