This repository has been archived by the owner on Dec 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 357
/
旋转方块加载动画.html
105 lines (77 loc) · 1.62 KB
/
旋转方块加载动画.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>旋转方块加载动画</title>
</head>
<body>
<style>
.logo {
width: 40px;
height: 40px;
background-color: #333;
margin: 100px auto;
animation: fanzhuan 1.2s infinite ease-in-out;
}
@keyframes fanzhuan{
0%{
transform: perspective(120px) rotateX(0deg) rotateY(0deg);
}
50%{
transform: perspective(120px) rotateX(180deg) rotateY(0deg);
}
100%{
transform: perspective(120px) rotateX(180deg) rotateY(180deg);
}
}
</style>
<div class="logo"></div>
<style>
.box{
width:40px;
height: 40px;
margin: 100px auto;
}
.box .sub{
width: 33%;
height: 33%;
background-color: #333;
float:left;
animation: boxshan 1.3s infinite ease-in-out;
}
@keyframes boxshan{
0%,70%,100%{
transform: scale(1);
}
35%{transform: scale(0);}
}
.box .sub:nth-child(7){
}
.box .sub:nth-child(4),.box .sub:nth-child(8){
animation-delay: 0.1s;
}
.box .sub:nth-child(1),.box .sub:nth-child(5),.box .sub:nth-child(9){
animation-delay: 0.2s;
}
.box .sub:nth-child(2),.box .sub:nth-child(6){
animation-delay: 0.3s;
}
.box .sub:nth-child(3){
animation-delay: 0.4s;
}
</style>
<div class="box">
<div class="sub"></div>
<div class="sub"></div>
<div class="sub"></div>
<div class="sub"></div>
<div class="sub"></div>
<div class="sub"></div>
<div class="sub"></div>
<div class="sub"></div>
<div class="sub"></div>
</div>
</body>
</html>