<!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>
.container {
width: 100px;
height: 100px;
background: #ffffff;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
padding: 5px;
}
.wave {
position: relative;
width: 100px;
height: 100px;
background:#1890FF;
}
.wave-mask {
position: absolute;
width: 200px;
height: 200px;
top: 0;
left: 50%;
border-radius: 40%;
transform: translate(-50%, -70%) rotate(0);
animation: toRotate 5s linear -5s infinite;
z-index: 20;
}
@keyframes toRotate {
50% {
transform: translate(-50%, -70%) rotate(180deg);
}
100% {
transform: translate(-50%, -70%) rotate(360deg);
}
}
.container {
overflow: hidden;
}
.wave-mask {
background-color: rgba(255, 255, 255, 0.9);
}
</style>
</head>
<body>
<div class="container">
<div class="wave"></div>
<div class="wave-mask"></div>
</div>
</body>
</html>
纯css绘制波浪动画效果
最新推荐文章于 2024-04-19 14:20:16 发布