加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
water-ripple.html 1.42 KB
一键复制 编辑 原始数据 按行查看 历史
王建立 提交于 2022-06-19 20:47 . css实现水波纹demo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>水波纹效果</title>
<style>
.wave-content {
height: 666px;
width: 666px;
left: 255px;
top: 139px;
position: relative;
}
.wave {
position: absolute;
left: 0px;
top: 0px;
height: 100%;
width: 100%;
transform-origin: center center;
background-color: transparent;
border: 1px solid #979797;
animation-duration: 7s;
animation-name: wv;
animation-timing-function: linear;
animation-iteration-count: infinite;
border-radius: 50%;
opacity: 0;
}
.wave1 {
animation-delay: 0s;
}
.wave2 {
animation-delay: 1.5s;
}
.wave3 {
animation-delay: 3s;
}
.wave4 {
animation-delay: 4.5s;
}
@keyframes wv {
0% {
opacity: 0;
transform: scale(0.5);
}
30% {
opacity: 0.7;
transform: scale(0.65);
}
70% {
opacity: 0.1;
transform: scale(0.85);
}
100% {
opacity: -0.2;
transform: scale(1);
}
}
</style>
</head>
<body>
<div class="wave-content ">
<div class="wave wave1 "></div>
<div class="wave wave2 "></div>
<div class="wave wave3 "></div>
<div class="wave wave4"></div>
</div>
</body>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化