-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
153 lines (125 loc) · 2.92 KB
/
index.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
144
145
146
147
148
149
150
151
152
153
<!DOCTYPE html>
<html lang="zh">
<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>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background: #eee;
}
@keyframes x {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
#八卦 {
/* border: 1px solid white; */
width: 400px;
height: 400px;
border-radius: 200px;
position: relative;
overflow: hidden;
/* transform: rotate(-90deg); */
animation: x 10s linear infinite;
}
#八卦>div:first-child {
/* border: 10px solid green; */
width: 50%;
height: 100%;
position: absolute;
left: 0;
background: black;
}
#八卦>div:nth-child(2) {
/* border: 10px solid skyblue; */
width: 50%;
height: 100%;
position: absolute;
right: 0;
background-color: white;
}
#八卦>div:nth-child(3) {
/* border: 1px solid blue; */
position: absolute;
width: 200px;
height: 200px;
left: 50%;
/* right: 0; */
margin-left: -100px;
border-radius: 50%;
background: black;
}
#八卦>div:nth-child(4) {
/* border: 1px solid blue; */
position: absolute;
width: 200px;
height: 200px;
left: 50%;
bottom: 0;
/* right: 0; */
margin-left: -100px;
border-radius: 50%;
background: white;
}
#八卦>div:nth-child(5) {
/* border: 1px solid blue; */
position: absolute;
width: 50px;
height: 50px;
left: 50%;
bottom: 65px;
/* right: 0; */
margin-left: -25px;
border-radius: 50%;
background: black;
}
#八卦>div:nth-child(6) {
/* border: 1px solid blue; */
position: absolute;
width: 50px;
height: 50px;
left: 50%;
top: 65px;
/* right: 0; */
margin-left: -25px;
border-radius: 50%;
background: white;
}
.wrapper {
/* border: 10px solid red; */
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
/*垂直水平居中的三行代码*/
flex-direction: column;
}
.bagua-description {
margin-top: 1em;
}
</style>
<body>
<div class="wrapper">
<div id="八卦">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
<div class="bagua-description">道可道,非常道</div>
</div>
</body>
</html>