<style> .map{ position: relative; width: 747px; height: 616px; background-color: green; margin: 0 auto; } .city{ position: absolute; top: 227px; right: 193px; } .dotted{ width: 8px; height: 8px; background-color: honeydew; border-radius: 50%; } .city div[class^="pulse"]{ /* 保证我们的小波纹在父盒子里面水平垂直居中 放大之后就会中心向四周发散 */ position: absolute; top: 50%; left: 50%; width: 8px; transform: translate(-50%,-50%); height: 8px; /* 阴影 */ box-shadow: 0 0 12px white; border-radius: 50%; animation-name: pulse; animation-duration: 1.2s; /* 无限循环 */ animation-iteration-count: infinite; /* 匀速变化 */ animation-timing-function: linear; } .city div.pulse2{ animation-delay: 0.4s; } .city div.pulse3{ animation-delay: 0.8s; } @keyframes pulse{ 0%{ } 70%{ width: 40px; height: 40px; /* 透明度 */ opacity: 1; } 100%{ width: 70px; height: 70px; opacity: 0; } }</style><body> <div class="map"> <div class="city"> <div class="dotted"></div> <div class="pulse1"></div> <div class="pulse2"></div> <div class="pulse3"></div> </div> </div></body>

