-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcodetest.html
More file actions
144 lines (125 loc) · 3.04 KB
/
Copy pathcodetest.html
File metadata and controls
144 lines (125 loc) · 3.04 KB
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
144
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: flex;
height: 100vh;
justify-content: center;
align-items: center;
}
#div {
background-color: #000;
width: 250px;
height: 250px;
position: relative;
/* overflow: hidden; */
border-radius: 100%;
}
#circle {
position: absolute;
right: 0;
top: 0;
width: 100%;
height: 100%;
border-radius: 50%;
background: blue;
animation: runs 1.7s linear infinite;
}
#d1 {
position: absolute;
right: 0;
top: 0;
background: #fff;
animation: run1 2s linear infinite;
transform-origin: bottom left;
}
#d2 {
position: absolute;
right: 50%;
top: 0;
background: #fff;
animation: run 2s linear infinite;
animation-delay: 0.75s;
transform-origin: bottom right;
}
#d3 {
position: absolute;
right: 0;
top: 50%;
background: #fff;
animation: run 2s linear infinite;
animation-delay: 0.25s;
transform-origin: top left;
}
#d4 {
position: absolute;
right: 50%;
top: 50%;
background: #fff;
animation: run 2s linear infinite;
animation-delay: 0.5s;
transform-origin: top right;
}
#d1,
#d2,
#d3,
#d4 {
width: 50%;
height: 50%;
}
@keyframes run {
0% {
transform: rotate(0deg);
}
50%,
100% {
transform: rotate(360deg);
}
}
@keyframes run1 {
0% {
transform: rotate(20deg);
}
50%,
100% {
transform: rotate(380deg);
}
}
@keyframes runs {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.zz {
width: 80%;
height: 80%;
border-radius: 50%;
position: relative;
top: 10%;
left: 10%;
background-color: #fff;
}
</style>
</head>
<body>
<div id="div">
<div id="circle">
<div id="d1"></div>
<div id="d2"></div>
<div id="d3"></div>
<div id="d4"></div>
<div class="zz"></div>
</div>
</div>
</body>
</html>