<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS3波浪音阶动画特效</title>
<style>
body {
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
overflow: hidden;
font-family: Arial, sans-serif;
}
.container {
position: relative;
width: 100%;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
.wave-container {
display: flex;
justify-content: center;
align-items: center;
height: 200px;
position: relative;
}
.wave {
position: relative;
width: 10px;
height: 100px;
background: #fff;
margin: 0 5px;
border-radius: 50px;
animation: wave 1.5s linear infinite;
transform-origin: bottom;
}
.wave:nth-child(1) {
animation-delay: 0.1s;
}
.wave:nth-child(2) {
animation-delay: 0.2s;
}
.wave:nth-child(3) {
animation-delay: 0.3s;
}
.wave:nth-child(4) {
animation-delay: 0.4s;
}
.wave:nth-child(5) {
animation-delay: 0.5s;
}
.wave:nth-child(6) {
animation-delay: 0.6s;
}
.wave:nth-child(7) {
animation-delay: 0.7s;
}
.wave:nth-child(8) {
animation-delay: 0.8s;
}
@keyframes wave {
0% {
transform: scaleY(0.2);
}
50% {
transform: scaleY(1);
}
100% {
transform: scaleY(0.2);
}
}
.link {
position: absolute;
bottom: 20px;
color: white;
text-decoration: none;
font-size: 14px;
opacity: 0.7;
transition: opacity 0.3s;
}
.link:hover {
opacity: 1;
}
</style>
</head>
<body>
<div class="container">
<div class="wave-container">
<div class="wave"></div>
<div class="wave"></div>
<div class="wave"></div>
<div class="wave"></div>
<div class="wave"></div>
<div class="wave"></div>
<div class="wave"></div>
<div class="wave"></div>
</div>
</div>
</body>
</html>
CSS3波浪音阶动画特效
于 2025-06-10 11:10:15 首次发布