-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshuidi.html
102 lines (91 loc) · 2.06 KB
/
shuidi.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
<!DOCTYPE html>
<html>
<head>
<title>水滴加载特效</title>
<style>
* {
margin: 0;
padding: 0;
}
body {
display: flex;
min-height: 100vh;
overflow: hidden;
justify-content: center;
align-items: center;
background: #010b10;
}
/* svg {
width: 0;
height: 0;
} */
.loading {
width: 200px;
height: 200px;
position: relative;
/* filter: url(#gooey); */
}
.loading span {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: block;
animation: loading 4s ease-in-out infinite;
/* var函数用来插入css变量的值,css变量名称以--开头 */
animation-delay: calc(0.2s * var(--i));
}
.loading span::before {
content: '';
position: absolute;
top: 0;
left: calc(50% - 20px);
width: 40px;
height: 40px;
background: linear-gradient(#fce4ec, #03a9f4);
border-radius: 50%;
box-shadow: 0 0 30px #03a9f4;
}
@keyframes loading {
0% {
transform: rotate(0deg);
}
50%,
100% {
transform: rotate(360deg);
}
}
</style>
</head>
<body>
<div class="loading">
<span style="--i:1"></span>
<span style="--i:2"></span>
<span style="--i:3"></span>
<span style="--i:4"></span>
<span style="--i:5"></span>
<span style="--i:6"></span>
<span style="--i:7"></span>
</div>
<script>
const str = `<svg>
<!-- filter元素id属性顶一个滤镜的唯一名称,
feGaussianBlur 定义模糊效果,
in="SourceGraphic"这个部分定义了由整个图像创建效果,
stdDeviation属性定义模糊量
-->
<filter id="gooey">
<feGaussianBlur in="SourceGraphic" stdDeviation="10" />
<!-- feColorMatrix 用于彩色滤光片转换 -->
<feColorMatrix values="
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 20 -10
" />
</filter>
</svg>`
</script>
</body>
</html>