大数据热点图–闪一闪的小点
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.map{
position: relative;
width: 700px;
height: 700px;
background: url(xxx/.jpg) no-repeat;//添加你自己喜欢的背景图片
margin: 0 auto;
}
.content{
position: absolute;
top: 100px;
right: 100px;
color: #fff;
}
.dotted{
width: 8px;
height: 8px;
border-radius: 50%;
background-color: #09f;
}
.content div[class^="pulse"]{//选择标签中class以pulse开头的类
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);使盒子中心位于中点位置,并且不受直接改width等的影响
width: 8px;
height: 8px;
box-shadow: 0 0 12px #009dfd;
border-radius: 50%;
animation: pulse 1.2s linear infinite;
}
.content div.pulse2 {
animation-delay: 0.4s;//延时进行动画,达到扩散效果
}
.content div.pulse3 {
animation-delay: 0.8s;
}
@keyframes pulse{
0% {
}//初始状态可以不用写
70% {
width: 40px;
height: 40px;
opacity: 1;//透明度
}
100% {
width: 70px;
height: 70px;
opacity: 0;
}
}
</style>
</head>
<body>
<div class="map">
<div class="content">
<div class="dotted"></div>
<div class="pulse1"></div>
<div class="pulse2"></div>
<div class="pulse3"></div>
</div>
</div>
</body>
</html>