-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathball.css
More file actions
89 lines (73 loc) · 1.58 KB
/
ball.css
File metadata and controls
89 lines (73 loc) · 1.58 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
body{
margin: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-image: linear-gradient(to );
font-family: Arial, sans-serif;
align-items: center;
margin: 0 auto;
}
.box1{
position: absolute;
width: 50px;
height: 50px;
background-color: #ff6584;
border-radius: 50%;
animation: circle 1s infinite ease-in-out;
/* box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.3); */
margin: 0 0 0 20px;
}
@keyframes circle {
0%, 100% {
transform: translateY(0);
background-color: chartreuse;
}
50% {
transform: translateY(-200px);
background-color: crimson;
}
}
.box2{
position: relative;
width: 50px;
height: 50px;
border-radius: 50%;
animation: rotate 1s infinite ease-in-out;
background-color: yellow;
margin: 0 0 0 20px;
}
@keyframes rotate {
0%, 100% {
transform: translatex(0);
background-color: green;
}
50% {
transform: translatex(-200px);
background-color: blueviolet;
}
}
.box3{
position:absolute ;
width: 50px;
height: 50px;
border-radius: 50%;
animation: pulse 1s infinite ease-in-out;
background-color: blue;
margin: 0 0 0 20px;
transition: transform 1s ease-in;
}
@keyframes pulse{
0%, 100% {
transform: translatez(0);
background-color: aqua;
}
50% {
transform: translateY(200px);
background-color: antiquewhite;
}
}
.box3:hover{
transform: translateY(100px);
}