forked from tecky708/app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AnimatedSpinner.html
143 lines (127 loc) · 2.39 KB
/
AnimatedSpinner.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<!DOCTYPE html>
<html lang="en">
<head>
<style>
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;700&display=swap');
*{
margin: 0;
padding: 0;
font-family: 'Poppins', sans-serif;
box-sizing: border-box;
}
body{
width: 100vw;
height: 100vh;
background-color: #182C61;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
animation: bgcolor 5s infinite linear;
}
@keyframes bgcolor {
0%{
background-color: #182C61;
}
25%{
background-color: #2C3A47;
}
50%{
background-color: #2c3e50;
}
100%{
background-color: #006266;
}
}
h3{
font-weight: 300;
color:white;
margin-top: 10px;
}
.spinner{
height: 50px;
width: 50px;
}
.spinner .ball{
width: 38px;
height: 38px;
position: absolute;
transform: rotate(225deg);
opacity: 0;
animation-name: rotate;
animation-duration: 4s;
animation-iteration-count: infinite;
}
.spinner .ball::after{
content: '';
position: absolute;
width: 6px;
height: 6px;
background-color: #fff;
border-radius: 50%;
}
@keyframes rotate {
0%{
opacity: 1;
transform: rotate(225deg);
animation-timing-function: ease-out;
}
7%{
transform: rotate(345deg);
animation-timing-function: linear;
}
30%{
transform: rotate(455deg);
animation-timing-function: ease-in-out;
}
39%{
transform: rotate(690deg);
opacity: 1;
animation-timing-function: linear;
}
70%{
transform: rotate(815deg);
animation-timing-function: ease-out;
}
75%{
transform: rotate(945deg);
}
76%{
transform: rotate(945deg);
opacity: 0;
}
100%{
transform: rotate(945deg);
opacity: 0;
}
}
.spinner .ball:nth-child(2){
animation-delay: 240ms;
}
.spinner .ball:nth-child(3){
animation-delay: 480ms;
}
.spinner .ball:nth-child(4){
animation-delay: 720ms;
}
.spinner .ball:nth-child(5){
animation-delay: 960ms;
}
</style>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Spinner</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="spinner">
<div class="ball"></div>
<div class="ball"></div>
<div class="ball"></div>
<div class="ball"></div>
<div class="ball"></div>
</div>
<h3>Loading... </h3>
</body>
</html>