-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path水波效果.html
82 lines (70 loc) · 1.95 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!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>水波效果</title>
<style>
* {
padding: 0;
margin: 0;
/* transition: all 1s; */
}
body {
height: 100vh;
background-color: #2c2c2c;
}
.item {
position: absolute;
width: 150px;
height: 150px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
border: 3px solid #fff;
border-radius: 50%;
overflow: hidden;
}
.item-waves {
width: 300px;
height: 300px;
background-color: rgba(0, 152, 255, 0.5);
position: absolute;
border-radius: 100px;
animation: waves infinite;
left: -5vw;
}
.waves1 {
top: 14vh;
animation-duration: 5s;
/* transform: rotate(5deg); */
}
.waves2 {
top: 12vh;
background-color: rgba(54, 151, 217, 0.5);
animation-duration: 6s;
}
.waves3 {
top: 10vh;
background-color: rgba(121, 183, 225, 0.5);
animation-duration: 7s;
}
@keyframes waves {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
</style>
</head>
<body>
<div class="item">
<section class="item-waves waves1"></section>
<section class="item-waves waves2"></section>
<section class="item-waves waves3"></section>
</div>
</body>
</html>