一、实现效果
二、实现代码
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-casle=1.0,user-scalable=no" />
<title>圆点扩散</title>
<style type="text/css">
body {
background: #444;
}
.logo {
width: 80px;
height: 80px;
background: #fff;
text-align: center;
line-height: 80px;
border-radius: 50%;
position: absolute;
top: 310px;
left: 0;
right: 0;
margin: 0 auto;
z-index: 9;
}
.animate-wave {
width: 500px;
height: 500px;
position: absolute;
top: 100px;
left: 0;
right: 0;
margin: 0 auto;
}
@-webkit-keyframes opac {
from {
opacity: 1;
width: 0;
height: 0;
top: 50%;
left: 50%;
}
to {
opacity: 0;
width: 100%;
height: 100%;
top: 0;
left: 0;
}
}
.animate-wave * {
background: #fcc;
position: absolute;
border-radius: 50%;
animation: opac 6s infinite;
}
.animate-wave .w2 {
animation-delay: 1s;
}
.animate-wave .w3 {
animation-delay: 2s;
}
.animate-wave .w4 {
animation-delay: 3s;
}
.animate-wave .w5 {
animation-delay: 4s;
}
.animate-wave .w6 {
animation-delay: 5s;
}
</style>
</head>
<body>
<div class="logo">LOGO</div>
<div class="animate-wave">
<div class="w1"></div>
<div class="w2"></div>
<div class="w3"></div>
<div class="w4"></div>
<div class="w5"></div>
<div class="w6"></div>
</div>
</body>
</html>
文章仅为本人学习过程的一个记录,仅供参考,如有问题,欢迎指出!