此css纯收藏使用

音频波纹加载

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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
body {
padding: 120px;
}

.music {
width: 175px;
height: 100px;
display: flex;
}

.music span {
width: 6px;
border-radius: 18px;
margin-right: 6px;
}

.music span:nth-child(1) {
animation: bar1 2s 0.2s infinite linear;
}

.music span:nth-child(2) {
animation: bar2 2s 0.4s infinite linear;
}

.music span:nth-child(3) {
animation: bar3 2s 0.6s infinite linear;
}

.music span:nth-child(4) {
animation: bar4 2s 0.8s infinite linear;
}

.music span:nth-child(5) {
animation: bar5 2s 1.0s infinite linear;
}

.music span:nth-child(6) {
animation: bar6 2s 1.2s infinite linear;
}

.music span:nth-child(7) {
animation: bar7 2s 1.4s infinite linear;
}

.music span:nth-child(8) {
animation: bar8 2s 1.6s infinite linear;
}

.music span:nth-child(9) {
animation: bar9 2s 1.8s infinite linear;
}

@keyframes bar1 {
0% {
background: #f677b0;
margin-top: 25%;
height: 10%;
}

50% {
background: #f677b0;
height: 100%;
margin-top: 0%;
}

100% {
background: #f677b0;
height: 10%;
margin-top: 25%;
}
}

@keyframes bar2 {
0% {
background: #df7ff2;
margin-top: 25%;
height: 10%;
}

50% {
background: #df7ff2;
height: 100%;
margin-top: 0%;
}

100% {
background: #df7ff2;
height: 10%;
margin-top: 25%;
}
}

@keyframes bar3 {
0% {
background: #8c7ff2;
margin-top: 25%;
height: 10%;
}

50% {
background: #8c7ff2;
height: 100%;
margin-top: 0%;
}

100% {
background: #8c7ff2;
height: 10%;
margin-top: 25%;
}
}

@keyframes bar4 {
0% {
background: #7fd0f2;
margin-top: 25%;
height: 10%;
}

50% {
background: #7fd0f2;
height: 100%;
margin-top: 0%;
}

100% {
background: #7fd0f2;
height: 10%;
margin-top: 25%;
}
}

@keyframes bar5 {
0% {
background: #7ff2d3;
margin-top: 25%;
height: 10%;
}

50% {
background: #7ff2d3;
height: 100%;
margin-top: 0%;
}

100% {
background: #7ff2d3;
height: 10%;
margin-top: 25%;
}
}

@keyframes bar6 {
0% {
background: #7ff2a0;
margin-top: 25%;
height: 10%;
}

50% {
background: #7ff2a0;
height: 100%;
margin-top: 0%;
}

100% {
background: #7ff2a0;
height: 10%;
margin-top: 25%;
}
}

@keyframes bar7 {
0% {
background: #adf27f;
margin-top: 25%;
height: 10%;
}

50% {
background: #adf27f;
height: 100%;
margin-top: 0%;
}

100% {
background: #adf27f;
height: 10%;
margin-top: 25%;
}
}

@keyframes bar8 {
0% {
background: #e7f27f;
margin-top: 25%;
height: 10%;
}

50% {
background: #e7f27f;
height: 100%;
margin-top: 0%;
}

100% {
background: #e7f27f;
height: 10%;
margin-top: 25%;
}
}

@keyframes bar9 {
0% {
background: #ecaa64;
margin-top: 25%;
height: 10%;
}

50% {
background: #ecaa64;
height: 100%;
margin-top: 0%;
}

100% {
background: #ecaa64;
height: 10%;
margin-top: 25%;
}
}
</style>
</head>

<body>
<div class="music">
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
</body>

</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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Colorful Line Animation</title>
<style>
body {
padding: 120px;
}

.mainbox {
width: 320px;
height: 320px;
position: relative;
/* 超出隐藏需要加上 */
overflow: hidden;
}

.content {
width: 320px;
height: 320px;
line-height: 320px;
text-align: center;
background-color: #cde;
}

.line {
/* 结合外层元素的相对定位 */
position: absolute;
}

.line:nth-child(1) {
top: 0;
left: 0;
width: 100%;
height: 3px;
/* 加上渐变效果,方可形成拖尾效果 */
background: linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet);
animation: animate1 8s linear infinite;
}

@keyframes animate1 {
0% {
left: -100%;
}

50%,
100% {
left: 100%;
}
}

.line:nth-child(2) {
top: -100%;
right: 0;
width: 3px;
height: 100%;
background: linear-gradient(180deg, red, orange, yellow, green, blue, indigo, violet);
animation: animate2 8s linear infinite;
/* 注意要加上延时触发动画效果,这样线条才会依次触发 */
animation-delay: 2s;
}

@keyframes animate2 {
0% {
top: -100%;
}

50%,
100% {
top: 100%;
}
}

.line:nth-child(3) {
bottom: 0;
right: 0;
width: 100%;
background: linear-gradient(270deg, red, orange, yellow, green, blue, indigo, violet);
animation: animate3 8s linear infinite;
animation-delay: 4s;
}

@keyframes animate3 {
0% {
right: -100%;
height: 3px;
}

50%,
100% {
height: 2px;
right: 100%;
}
}

.line:nth-child(4) {
bottom: -100%;
left: 0;
width: 3px;
height: 100%;
background: linear-gradient(360deg, red, orange, yellow, green, blue, indigo, violet);
animation: animate4 8s linear infinite;
animation-delay: 6s;
}

@keyframes animate4 {
0% {
bottom: -100%;
}

50%,
100% {
bottom: 100%;
}
}
</style>
</head>
<body>
<div class="mainbox">
<span class="line"></span>
<span class="line"></span>
<span class="line"></span>
<span class="line"></span>
<div class="content"></div>
</div>
</body>
</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

<!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>
.wrap {
margin: 120px 0 0 240px;
width: 75px;
height: 75px;
position: relative;
/* transform-origin: 设置的效果搭配边框看,效果更加明显 */
/* border: 1px solid #e9e9e9; */
}

.round {
position: absolute;
width: 13px;
height: 13px;
border-radius: 50%;
background-color: rgb(241, 141, 157);
/* 加上动画效果 */
animation: circleRound 2.8s ease infinite;
/* 设置旋转中心,搭配.wrap的border看 */
transform-origin: 50% 75px;
}

/* 注意z-index层级关系,依次递减 */
.round:nth-child(1) {
z-index: 7;
}

/* 注意动画延后animation-delay播放,依次递增 */
/* 至于小圆球则越来越小 */
.round:nth-child(2) {
height: 12px;
width: 12px;
background-color: rgb(199, 136, 185);
animation-delay: .2s;
z-index: 6;
}

.round:nth-child(3) {
height: 11px;
width: 11px;
background-color: rgb(153, 69, 223);
animation-delay: .4s;
z-index: 5;
}

.round:nth-child(4) {
height: 10px;
width: 10px;
background-color: rgb(69, 141, 223);
animation-delay: .6s;
z-index: 4;
}

.round:nth-child(5) {
height: 9px;
width: 9px;
background-color: rgb(69, 223, 203);
animation-delay: .8s;
z-index: 3;
}

.round:nth-child(6) {
height: 8px;
width: 8px;
background-color: rgb(100, 223, 69);
animation-delay: 1s;
z-index: 2;
}

.round:nth-child(7) {
height: 7px;
width: 7px;
background-color: rgb(223, 200, 69);
animation-delay: 1.2s;
z-index: 1;
}

@keyframes circleRound {
to {
transform: rotate(1turn);
}
}
</style>
</head>

<body>
<div class="wrap">
<div class="round"></div>
<div class="round"></div>
<div class="round"></div>
<div class="round"></div>
<div class="round"></div>
<div class="round"></div>
<div class="round"></div>
</div>
</body>

</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
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
/* 主要是text-shadow和transform搭配动画的巧妙运用 */
.wrap {
width: 600px;
height: 480px;
box-sizing: border-box;
padding: 120px;
background-color: #000;
color: transparent;
display: flex;
}

h3 {
text-shadow: 0 0 0 #fff;
animation: smoky 6s infinite;
}

@keyframes smoky {
60% {
text-shadow: 0 0 40px #fff;
}

100% {
text-shadow: 0 0 20px #fff;
/* 这里是重点 */
transform: translate3d(15rem, -8rem, 0) rotate(-40deg) skew(70deg) scale(1.5);
opacity: 0;
}
}

h3:nth-child(1) {
animation-delay: 1s;
}

h3:nth-child(2) {
animation-delay: 1.4s;
}

h3:nth-child(3) {
animation-delay: 1.8s;
}

h3:nth-child(4) {
animation-delay: 2.2s;
}

h3:nth-child(5) {
animation-delay: 2.6s;
}
</style>
</head>

<body>
<div class="wrap">
<h3>1</h3>
<h3>2</h3>
<h3>3</h3>
<h3>4</h3>
<h3>5</h3>
</div>
</body>

</html>