栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > Web开发 > Html/CSS > CSS教程

如何使用css实现数据热点效果

CSS教程 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

效果如下:


在这里插入图片描述

分析

1.这里看到的大概有三个圈 围着点在做放大动画

所以我们写四个盒子 点+3个圈





    
    
    document
    
 .city {
     width: 200px;
     height: 200px;
     background-color: gray;
     position: relative;
 }
 
 .pul {
     width: 8px;
     height: 8px;
     background-color: #09f;
     border-radius: 50%;
     top: 0;
     bottom: 0;
     left: 0;
     right: 0;
     margin: auto;
     position: absolute;
 }
 
 
 .city div[class^="pul"] {
     
     top: 0;
     bottom: 0;
     left: 0;
     right: 0;
     margin: auto;
     position: absolute;
     width: 8px;
     height: 8px;
     border-radius: 50%;
     box-shadow: 0px 0px 10px #09f;
 }
    



    
 
 
 
 
    



在这里插入图片描述

写完后 我们是需要给这三个圈 加放大的动画 但是可以看到 三个圈并不是同时触发动画的 所以需要给三个圈 设置不同的延迟时间 定义动画


  @keyframes pul {
     0% {}
     50% {
  width: 20px;
  height: 20px;
  opacity: 1;

     }

     100% {
  width: 50px;
  height: 50px;
  opacity: 0;
     }
 }

使用动画

.city>div:nth-child(2) {
     animation: pul 2s .5s linear infinite;
 }
 
 .city>div:nth-child(3) {
     animation: pul 2s 1s linear infinite;
 }
 
 .city>div:nth-child(4) {
     animation: pul 2s 1.5s linear infinite;
 }

效果如下:


在这里插入图片描述

背景图可以自己找 这里就不发了 发上来下载要钱

到此这篇关于如何使用css实现数据热点效果的文章就介绍到这了,更多相关css数据热点内容请搜索考高分网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持考高分网!

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/214525.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号