-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBall.html
120 lines (120 loc) · 4.09 KB
/
Ball.html
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
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
.ball1{
width: 60px;
height: 60px;
border-radius: 100px;
background-color: blue;
border :solid;
border-color:pink;
animation-name: b1;
animation-duration: 5s;
position: absolute;
animation-iteration-count: infinite;
z-index: 5;
animation-timing-function: linear;
}
@keyframes b1 {
0%{top: calc(50% - 60px); left: 0%;}
25%{top: 50%; left: 95%;}
50%{top: 50%; left: 0%;}
75%{top: 50%; left: 95%;}
100%{top: 50%; left: 50%;}
}
.ball2{
width: 60px;
height: 60px;
border-radius: 100px;
background-color: white;
border :solid;
border-color:pink;
animation-name: b2;
animation-duration: 5s;
position: absolute;
animation-iteration-count: infinite;
z-index: 4;
animation-timing-function: linear;
}
@keyframes b2 {
0%{top: calc(50% - 60px); left: 0%;}
25%{top: 50%; left: 95%;}
50%{top: 2%; left: 50%;}
75%{top: 50%; left: 95%;}
100%{top: 50%; left: 50%;}
}
.ball3{
width: 60px;
height: 60px;
border-radius: 100px;
background-color: black;
border :solid;
border-color:pink;
animation-name: b3;
animation-duration: 5s;
position: absolute;
animation-iteration-count: infinite;
z-index: 3;
animation-timing-function: linear;
}
@keyframes b3 {
0%{top: calc(50% - 60px); left: 0%;}
25%{top: 50%; left: 95%;}
50%{top: 90%; left: 50%;}
75%{top: 50%; left: 95%;}
100%{top: 50%; left: 50%;}
}
.ball4{
width: 60px;
height: 60px;
border-radius: 100px;
background-color: royalblue;
border :solid;
border-color:pink;
animation-name: b4;
animation-duration: 5s;
position: absolute;
animation-iteration-count: infinite;
z-index: 2;
animation-timing-function: linear;
}
@keyframes b4 {
0%{top: calc(50% - 60px); left: 0%;}
25%{top: 50%; left: 95%;}
50%{top: 2%; left: 50%;}
75%{top: 50%; left: 0%;}
100%{top: 50%; left: 50%;}
}
.ball5{
width: 60px;
height: 60px;
border-radius: 100px;
background-color: yellowgreen;
border :solid;
border-color:pink;
animation-name: b5;
animation-duration: 5s;
position: absolute;
animation-iteration-count: infinite;
z-index: 1;
animation-timing-function: linear;
}
@keyframes b5 {
0%{top: calc(50% - 60px); left: 0%;}
25%{top: 50%; left: 95%;}
50%{top: 90%; left: 50%;}
75%{top: 50%; left: 0%;}
100%{top: 50%; left: 50%;}
}
</style>
</head>
<body style="background-color: violet;">
<div class="ball1"></div>
<div class="ball2"></div>
<div class="ball3"></div>
<div class="ball4"></div>
<div class="ball5"></div>
</body>
</html>