-
Notifications
You must be signed in to change notification settings - Fork 0
/
CodePen Home Loading Bouncy ball .html
78 lines (68 loc) · 1.43 KB
/
CodePen Home Loading Bouncy 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
<!DOCTYPE html>
<html>
<head>
<title>CodePen Home
Loading Bouncy ball </title>
<style type="text/css">
body {
position: relative;
width: 100%;
height: 100vh;
font-family: Montserrat;
}
.wrap {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.text {
color: #fbae17;
display: inline-block;
margin-left: 5px;
}
.bounceball {
position: relative;
display: inline-block;
height: 37px;
width: 15px;
}
.bounceball:before {
position: absolute;
content: "";
display: block;
top: 0;
width: 15px;
height: 15px;
border-radius: 50%;
background-color: #fbae17;
transform-origin: 50%;
animation: bounce 500ms alternate infinite ease;
}
@keyframes bounce {
0% {
top: 30px;
height: 5px;
border-radius: 60px 60px 20px 20px;
transform: scaleX(2);
}
35% {
height: 15px;
border-radius: 50%;
transform: scaleX(1);
}
100% {
top: 0;
}
}
</style>
</head>
<body>
<div class="wrap">
<div class="loading">
<div class="bounceball"></div>
<div class="text">LOADING</div>
</div>
</div>
</body>
</html>