forked from tobiasahlin/SpinKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
10-fading-circle.html
87 lines (80 loc) · 3.17 KB
/
10-fading-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
<html>
<head>
<title>Fading 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: 18%;
height: 18%;
background-color: #333;
border-radius: 100%;
-webkit-animation: fadedelay 1.2s infinite ease-in-out;
animation: fadedelay 1.2s infinite ease-in-out;
/* Prevent first frame from flickering when animation starts */
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
.circle2 { transform: rotate(30deg); -webkit-transform: rotate(30deg) }
.circle3 { transform: rotate(60deg); -webkit-transform: rotate(60deg) }
.circle4 { transform: rotate(90deg); -webkit-transform: rotate(90deg) }
.circle5 { transform: rotate(120deg); -webkit-transform: rotate(120deg) }
.circle6 { transform: rotate(150deg); -webkit-transform: rotate(150deg) }
.circle7 { transform: rotate(180deg); -webkit-transform: rotate(180deg) }
.circle8 { transform: rotate(210deg); -webkit-transform: rotate(210deg) }
.circle9 { transform: rotate(240deg); -webkit-transform: rotate(240deg) }
.circle10 { transform: rotate(270deg); -webkit-transform: rotate(270deg) }
.circle11 { transform: rotate(300deg); -webkit-transform: rotate(300deg) }
.circle12 { transform: rotate(330deg); -webkit-transform: rotate(330deg) }
.circle2:before { animation-delay: -1.1s; -webkit-animation-delay: -1.1s }
.circle3:before { animation-delay: -1.0s; -webkit-animation-delay: -1.0s }
.circle4:before { animation-delay: -0.9s; -webkit-animation-delay: -0.9s }
.circle5:before { animation-delay: -0.8s; -webkit-animation-delay: -0.8s }
.circle6:before { animation-delay: -0.7s; -webkit-animation-delay: -0.7s }
.circle7:before { animation-delay: -0.6s; -webkit-animation-delay: -0.6s }
.circle8:before { animation-delay: -0.5s; -webkit-animation-delay: -0.5s }
.circle9:before { animation-delay: -0.4s; -webkit-animation-delay: -0.4s }
.circle10:before { animation-delay: -0.3s; -webkit-animation-delay: -0.3s }
.circle11:before { animation-delay: -0.2s; -webkit-animation-delay: -0.2s }
.circle12:before { animation-delay: -0.1s; -webkit-animation-delay: -0.1s }
@-webkit-keyframes fadedelay {
0%, 39%, 100% { opacity: 0 }
40% { opacity: 1 }
}
@keyframes fadedelay {
0%, 39%, 100% { opacity: 0 }
40% { opacity: 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>