<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<style>
/* 扩散动画 */
@keyframes spread {
0% {
opacity : .2;
transform: translate(-50%, -50%) scale(1, 1);
}
50% {
opacity : .3;
transform: translate(-50%, -50%) scale(1.12, 1.12);
}
100% {
opacity : .2;
transform: translate(-50%, -50%) scale(1, 1);
}
}
.normal_dot {
position : relative;
width : 6px;
height : 6px;
border-radius: 50%;
background : #009916;
}
.normal_dot::before {
content : '';
position : absolute;
top : 50%;
left : 50%;
transform: translate(-50%, -50%);
width : 13px;
height : 13px;
border-radius : 50%;
opacity : .1;
background-color : #00BF1C;
animation : spread 2.1s infinite ease-in-out;
animation-fill-mode: both;
}
.normal_dot::after {
content : '';
position : absolute;
top : 50%;
left : 50%;
transform: translate(-50%, -50%);
width : 20px;
height : 20px;
border-radius : 50%;
opacity : .05;
background-color : #00BF1C;
animation : spread 2.1s infinite ease-in-out;
animation-fill-mode: both;
}
</style>
<body>
<div class="normal_dot"></div>
</body>
</html>
css 圆点背面两层背景并能动
于 2022-03-04 11:03:25 首次发布