-
Notifications
You must be signed in to change notification settings - Fork 0
/
Design B.html
147 lines (136 loc) · 3.49 KB
/
Design B.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
<!DOCTYPE html>
<html>
<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>
<style>
* {
margin: 0;
padding: 0;
}
ul {
position: relative;
margin: 25vmin auto;
width: 50vmin;
height: 50vmin;
animation: motive 3s infinite linear;
list-style: none;
transform-style: preserve-3d;
transition: all 0.3s;
}
li {
position: absolute;
width: 100%;
height: 100%;
transition: all 3s;
}
span {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
display: block;
margin: auto;
width: 8vmin;
height: 8vmin;
animation: circle 0.1s infinite linear;
background: rgba(0, 0, 0, 0.8);
border-radius: 50%;
color: white;
font-size: 5vmin;
line-height: 8vmin;
text-align: center;
transition: all 3s;
}
li:nth-of-type(1) {
background: rgba(255, 64, 87, 0.5);
transform: translate3d(0, 0, 25vmin);
}
li:nth-of-type(2) {
background: rgba(0, 116, 228, 0.5);
transform: translate3d(0, 0, -25vmin);
}
li:nth-of-type(3) {
background: rgba(253, 184, 125, 0.5);
transform: translate3d(-25vmin, 0, 0) rotate3d(0, 1, 0, 90deg);
}
li:nth-of-type(4) {
background: rgba(69, 235, 165, 0.5);
transform: translate3d(25vmin, 0, 0) rotate3d(0, 1, 0, 90deg);
}
li:nth-of-type(5) {
background: rgba(255, 119, 119, 0.5);
transform: translate3d(0, -25vmin, 0) rotate3d(1, 0, 0, 90deg);
}
li:nth-of-type(6) {
background: rgba(50, 50, 50, 0.5);
transform: translate3d(0, 25vmin, 0) rotate3d(1, 0, 0, 90deg);
}
@keyframes motive {
0% {
transform: rotate3d(1, 1, 1, 0deg) scale3d(0.5, 0.5, 0.5);
}
50% {
transform: rotate3d(1, 1, 1, 180deg) scale3d(1.5, 1.5, 1.5);
}
100% {
transform: rotate3d(1, 1, 1, 360deg) scale3d(0.5, 0.5, 0.5);
}
}
@keyframes circle {
0% {
transform: translate3d(0, -10vmin, 0);
}
12.5% {
transform: translate3d(7.072vmin, -7.072vmin, 0);
}
25% {
transform: translate3d(10vmin, 0, 0);
}
37.5% {
transform: translate3d(7.072vmin, 7.072vmin, 0);
}
50% {
transform: translate3d(0, 10vmin, 0);
}
62.5% {
transform: translate3d(-7.072vmin, 7.072vmin, 0);
}
75% {
transform: translate3d(-10vmin, 0, 0);
}
87.5% {
transform: translate3d(-7.072vmin, -7.072vmin, 0);
}
100% {
transform: translate3d(0, -10vmin, 0);
}
}
</style>
</head>
<body>
<ul>
<li>
<span>1</span>
</li>
<li>
<span>2</span>
</li>
<li>
<span>3</span>
</li>
<li>
<span>4</span>
</li>
<li>
<span>5</span>
</li>
<li>
<span>6</span>
</li>
</ul>
</body>
</html>