-
Notifications
You must be signed in to change notification settings - Fork 105
/
Bouncing Ball.html
54 lines (51 loc) · 1.22 KB
/
Bouncing 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
<html>
<head>
<title>Bouncing Ball | Loaders</title>
<style>
body{
background-color: white;
}
#bouncing-ball{
margin: 0 auto;
top: 30px;
width: 50px;
height: 50px;
background: radial-gradient(ellipse at 30px 10px, #fff 0%, #03a9f4 25%, #000 90%);
border-radius: 50%;
animation: ball 0.8s infinite alternate;
}
#bouncing-ball::after {
content: '';
position: absolute;
box-shadow: 0 15px 20px rgba(0, 0, 0, 1);
width: 70%;
left: 5%;
height: 2px;
animation: after 0.8s infinite alternate;
}
@keyframes after{
0% {
bottom: 10px;
}
100% {
bottom: -100px;
}
}
@keyframes ball{
0% {
transform: translateY(100px);
width: 58px;
}
8% {
width: 50px;
}
100% {
transform: translateY(0px);
}
}
</style>
</head>
<body>
<div id="bouncing-ball"></div>
</body>
</html>