forked from tobiasahlin/SpinKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
8-circle.html
92 lines (85 loc) · 3.34 KB
/
8-circle.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
<html>
<head>
<title>Spinning Circle</title>
<style>
.spinner {
margin: 100px auto;
width: 22px;
height: 22px;
position: relative;
}
.circle {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
}
.circle:before {
content: '';
display: block;
margin: 0 auto;
width: 20%;
height: 20%;
background-color: #333;
border-radius: 100%;
-webkit-animation: bouncedelay 1.2s infinite ease-in-out;
animation: bouncedelay 1.2s infinite ease-in-out;
/* Prevent first frame from flickering when animation starts */
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
.circle2 { -webkit-transform: rotate(30deg); transform: rotate(30deg) }
.circle3 { -webkit-transform: rotate(60deg); transform: rotate(60deg) }
.circle4 { -webkit-transform: rotate(90deg); transform: rotate(90deg) }
.circle5 { -webkit-transform: rotate(120deg); transform: rotate(120deg) }
.circle6 { -webkit-transform: rotate(150deg); transform: rotate(150deg) }
.circle7 { -webkit-transform: rotate(180deg); transform: rotate(180deg) }
.circle8 { -webkit-transform: rotate(210deg); transform: rotate(210deg) }
.circle9 { -webkit-transform: rotate(240deg); transform: rotate(240deg) }
.circle10 { -webkit-transform: rotate(270deg); transform: rotate(270deg) }
.circle11 { -webkit-transform: rotate(300deg); transform: rotate(300deg) }
.circle12 { -webkit-transform: rotate(330deg); transform: rotate(330deg) }
.circle2:before { -webkit-animation-delay: -1.1s; animation-delay: -1.1s }
.circle3:before { -webkit-animation-delay: -1.0s; animation-delay: -1.0s }
.circle4:before { -webkit-animation-delay: -0.9s; animation-delay: -0.9s }
.circle5:before { -webkit-animation-delay: -0.8s; animation-delay: -0.8s }
.circle6:before { -webkit-animation-delay: -0.7s; animation-delay: -0.7s }
.circle7:before { -webkit-animation-delay: -0.6s; animation-delay: -0.6s }
.circle8:before { -webkit-animation-delay: -0.5s; animation-delay: -0.5s }
.circle9:before { -webkit-animation-delay: -0.4s; animation-delay: -0.4s }
.circle10:before { -webkit-animation-delay: -0.3s; animation-delay: -0.3s }
.circle11:before { -webkit-animation-delay: -0.2s; animation-delay: -0.2s }
.circle12:before { -webkit-animation-delay: -0.1s; animation-delay: -0.1s }
@-webkit-keyframes bouncedelay {
0%, 80%, 100% { -webkit-transform: scale(0.0) }
40% { -webkit-transform: scale(1.0) }
}
@keyframes bouncedelay {
0%, 80%, 100% {
-webkit-transform: scale(0.0);
transform: scale(0.0);
} 40% {
-webkit-transform: scale(1.0);
transform: scale(1.0);
}
}
</style>
</head>
<body>
<div class="spinner">
<div class="circle1 circle"></div>
<div class="circle2 circle"></div>
<div class="circle3 circle"></div>
<div class="circle4 circle"></div>
<div class="circle5 circle"></div>
<div class="circle6 circle"></div>
<div class="circle7 circle"></div>
<div class="circle8 circle"></div>
<div class="circle9 circle"></div>
<div class="circle10 circle"></div>
<div class="circle11 circle"></div>
<div class="circle12 circle"></div>
</div>
</body>
</html>