-
Notifications
You must be signed in to change notification settings - Fork 0
/
旋转八卦.html
60 lines (60 loc) · 1.47 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
<!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>Document</title>
<style>
* {
padding: 0;
margin: 0;
}
body {
background-color: #ccc;
}
div {
width: 400px;
height: 400px;
/* border: 1px solid red; */
border-radius: 50%;
position: relative;
animation: rotate linear 20s infinite;
background: linear-gradient(to bottom, #ffffff 0%,#fff 50%,#000000 51%,#000000 100%);
}
div::before {
content: '';
width: 30px;
height: 30px;
border: 85px solid #000;
position: absolute;
border-radius: 50%;
top: 25%;
left: 0;
background-color: #fff;
}
div::after {
content: '';
width: 30px;
height: 30px;
border: 85px solid #fff;
position: absolute;
border-radius: 50%;
top: 25%;
right: 0;
background-color: #000;
}
@keyframes rotate{
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
</style>
</head>
<body>
<div></div>
</body>
</html>