位置: IT常识 - 正文

大数据热点城市波动图案例【CSS3实现 + 原理分析 + 源码获取】(大数据热点话题)

编辑:rootadmin
大数据热点城市波动图案例【CSS3实现 + 原理分析 + 源码获取】 一:案例效果

       本次案例我们分析一下数据可视化页面最常见的热点图是如何实现的,其原理并不复杂,只需要用到CSS3动画属性 animation 以及 @keyframe 关键帧即可,重点是向外扩散的环如何布局比较合适,以及每个环怎么扩散何时扩散比较合适。

推荐整理分享大数据热点城市波动图案例【CSS3实现 + 原理分析 + 源码获取】(大数据热点话题),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:大数据谈论热点有,大数据热点新闻,大数据 城市,大数据热度,大数据热度,大数据热点分析,大数据热点话题,大数据的热点,内容如对您有帮助,希望把文章链接给更多的朋友!

大数据热点城市波动图案例【CSS3实现 + 原理分析 + 源码获取】(大数据热点话题)

二:源码获取

源码我已经上传到了资源里,想拿来学习引用的小伙伴直接下载即可,没有会员的可以私聊我 “大数据热点图” 免费获取,下方是源码的资源链接

大数据热点波动图,纯css3实现-Javascript文档类资源-CSDN下载通过css3动画设置的大数据热点波动图,主要利用了animation动画更多下载资源、学习资料请访问CSDN下载频道.https://download.csdn.net/download/weixin_52212950/86728456

三:原理分析

原理分析我们分为热点的布局分析与热点向外扩散的动画实现的分析

3.1 布局分析布局我们那单独的一个城市分析,例如地图中北京的 ,其由一个类名为city1的最外层盒子来添加定位以定到目标城市位置,其不设置宽高,大小完全由中心点撑起(即第二个类名为center的盒子) ,波纹其实是有三个圈圈组成的,最开始是完全重合的,用中心小算法来保证其永远是围绕center来扩散的。 <div class="city1"> <div class="center1"></div> <p class="bj">Beijing</p> <div class="bw1"></div> <div class="bw2"></div> <div class="bw3"></div> </div>波纹的样式添加我们采用了属性选择器 .city1 div[class^="bw"],即选择父类city1里面类名以bw开头的所有子div标签 .city1{ position: absolute; top: 370px; right: 403px; color: aliceblue; } .center1{ width: 5px; height: 5px; background-color: rgb(255, 255, 255); box-shadow: 0 0 12px 2px #fff; border-radius: 50%; } .city1 div[class^="bw"]{ position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 5px; height: 5px; box-shadow: 0 0 7px #fff; border-radius: 50%; animation: scla 3s linear infinite; } .map .city1 div.bw2{ animation-delay: 1s; } .map .city1 div.bw3{ animation-delay: 2s; }3.2 动画分析本次添加的关键帧为:0%的时候波纹是完全不透明的,50%的时候宽高均变大为105px,即圈圈在总动画时间50%的时候要从宽高5px扩散到宽高105px,然后变为半透明状态。再下一个是100%的时候,扩散到宽高150px,并变成完全不透明。要给波纹添加属性:animation: scla 3s linear infinite;  含义为3s做完动画,匀速,并且无限循环为了呈现出波纹一个接一个往外扩散而不是一起扩散,需要给第一个圈圈直接开始扩散,第二个圈圈第三个圈圈设置不同的 animation-delay 动画延迟,第二个设置为1s,第二个设置为2s,这样就可以呈现出一个接一个往外扩散了 /* @keyframes关键帧动画 */ @keyframes scla{ 0% { opacity: 1; } 50% { width: 105px; height: 105px; opacity: 0.5; } 100% { width: 150px; height: 150px; opacity: 0; } } .city3 div[class^="bw"]{ position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 5px; height: 5px; box-shadow: 0 0 7px #fff; border-radius: 50%; animation: scla 3s linear infinite; } .map .city3 div.bw2{ animation-delay: 1s; } .map .city3 div.bw3{ animation-delay: 2s; }四:主要代码<style> *{ margin: 0; padding: 0; box-sizing: border-box; } body{ background-color: rgb(45, 45, 45); } .map{ position: relative; width: 1400px; height: 830px; background-image: url(./img/QX3OPNW5qY.png); background-repeat: no-repeat; background-size: 100%; margin: 0 auto; } .bj{ position: absolute; top: 15px; left: 10px; font-size: 10px; } .Gambia{ position: absolute; top: 15px; left: 10px; font-size: 10px; color:rgb(255, 153, 153) } .Island{ position: absolute; top: 15px; left: 10px; font-size: 10px; } /* 城市1 */ .city1{ position: absolute; top: 370px; right: 403px; color: aliceblue; } .center1{ width: 5px; height: 5px; background-color: rgb(255, 255, 255); box-shadow: 0 0 12px 2px #fff; border-radius: 50%; } .city1 div[class^="bw"]{ position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 5px; height: 5px; box-shadow: 0 0 7px #fff; border-radius: 50%; animation: scla 3s linear infinite; } .map .city1 div.bw2{ animation-delay: 1s; } .map .city1 div.bw3{ animation-delay: 2s; } /* 城市2 */ .city2{ position: absolute; top: 500px; right: 703px; color: aliceblue; } .center2{ width: 5px; height: 5px; background-color: rgb(255, 255, 255); box-shadow: 0 0 12px 2px #fff; border-radius: 50%; } .city2 div[class^="bw"]{ position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 5px; height: 5px; box-shadow: 0 0 7px rgb(255, 149, 149); border-radius: 50%; animation: scla1 3s linear infinite; } .map .city2 div.bw2{ animation-delay: 0.75s; } .map .city2 div.bw3{ animation-delay: 1.5s; } .map .city2 div.bw4{ animation-delay: 2.25s; } /* 城市3 */ .city3{ position: absolute; top: 200px; right: 1003px; color: aliceblue; } .center3{ width: 5px; height: 5px; background-color: rgb(255, 255, 255); box-shadow: 0 0 12px 2px #fff; border-radius: 50%; } /* 属性选择器 正则表达式筛选bw开头类名 */ .city3 div[class^="bw"]{ position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 5px; height: 5px; box-shadow: 0 0 7px #fff; border-radius: 50%; animation: scla 3s linear infinite; } .map .city3 div.bw2{ animation-delay: 1s; } .map .city3 div.bw3{ animation-delay: 2s; } /* @keyframes关键帧动画 */ @keyframes scla{ 0% { opacity: 1; } 50% { width: 105px; height: 105px; opacity: 0.5; } 100% { width: 150px; height: 150px; opacity: 0; } } @keyframes scla1{ 0% { opacity: 1; } 50% { width: 285px; height: 285px; opacity: 0.5; } 100% { width: 330px; height: 330px; opacity: 0; } } </style></head><body> <div class="map"> <div class="city1"> <div class="center1"></div> <p class="bj">Beijing</p> <div class="bw1"></div> <div class="bw2"></div> <div class="bw3"></div> </div> <div class="city2"> <div class="center2"></div> <p class="Gambia">Gambia</p> <div class="bw1"></div> <div class="bw2"></div> <div class="bw3"></div> <div class="bw4"></div> </div> <div class="city3"> <div class="center3"></div> <p class="Island">Island</p> <div class="bw1"></div> <div class="bw2"></div> <div class="bw3"></div> </div> </div></body>
本文链接地址:https://www.jiuchutong.com/zhishi/299556.html 转载请保留说明!

上一篇:ansible命令 运维自动化工具(基于ansible的运维平台)

下一篇:【ChatGPT】ChatGPT 能否取代程序员?(chatb)

  • 农产品的税率是9%吗
  • 实际已缴纳所得税额在汇算清缴报告里怎么看
  • 生产企业的基础设施是指
  • 一般纳税人给小规模开普票是几个点
  • 餐饮企业原材料四大类
  • 工业企业制造费用具体怎么摊
  • 购买产品没开发票支付宝支付
  • 长期挂账的应付账款怎么处理
  • 公司购买商品房可以抵扣增值税吗
  • 集团公司转股要交印花税吗?
  • 营改增后发票上必须要开具税收分类编码吗?
  • 免税企业土地税怎么交
  • 建筑企业与建设局的关系
  • 进项税转出月底怎么处理
  • 增值税发票二联折叠票样式
  • 本月没有发生额本月合计
  • 发票代码和发票号码在一起怎么办
  • 进口料件和出口成品的关系
  • 代开发票预缴的增值税能否申请退税
  • 企业增值税征收时间
  • 什么收入不需要交税0税
  • 利润弥补亏损如何处理
  • 债券的到期收益率取决于
  • 小型微利企业怎么认定最新标准
  • 软件研发公司有哪些岗位
  • 会计凭证传递的原则及基本程序
  • 实习生短期意外保险能企业所得税前扣除吗?
  • 腾讯电脑管家上的steam可以吗
  • phpcookie
  • PHP:stream_filter_remove()的用法_Stream函数
  • PHP:pg_lo_truncate()的用法_PostgreSQL函数
  • 多对账工作的主要内容
  • 遇到的问题及解决方法
  • 会计政策变更追溯调整为什么不影响所得税
  • 新购车辆检测费计入原值吗
  • python魔法方法详解
  • mysql存储引擎是什么意思
  • 自产农产品免征个人所得税吗
  • 土地增值税采用
  • 小规模纳税人差额征收税率是多少
  • 企业所得税计算器在线计算
  • 预收账款和应收账款的转换
  • 代开运输发票会不会造成重复征税?
  • 财政补贴的会计分录
  • 所得税纳税年度
  • 计划成本法存货会计分录
  • 加油卡充值如何开发票
  • 房屋租赁违约金怎么规定
  • 银行回单nxt
  • 劳务公司 成本
  • 工程结算一般由什么等方式
  • 企业如何设置预缴税款
  • 生产企业下单就做收入没交货怎么做账
  • 企业所得税里的利润总额按什么填写
  • 商业企业的期间费用包括
  • 数据库复制数据sql语句
  • sql server常用管理工具中,用于访问
  • doc怎么使用
  • win8出现问题需要重启
  • win8命令提示符管理员怎么打开
  • macos邮件
  • winXP系统截图
  • win10以太网属性为空白怎么办
  • 如何解决windows副本不是正版
  • windows8.1如何安装
  • cocos creator 动画制作
  • javascript标题
  • js怎么操作css
  • jquery异常捕获
  • jquery购物车商品价格计算
  • jquery教程 csdn
  • json convert
  • python文件文件夹操作
  • 安卓 crash
  • 国税总局201439号公告
  • 四川国税发票真伪查询
  • 个人所得税对什么征税
  • 扬州地方税务局在哪
  • 如何查询车辆购买的保险是哪家保险公司
  • 青岛个人所得税咨询电话是多少
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

    网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

    友情链接: 武汉网站建设