当前位置: 首页 > news >正文

提供邯郸wap网站建设西安网站seo价格

提供邯郸wap网站建设,西安网站seo价格,青岛网站优化公司哪家好,莆田网站建设技术托管css计时器 animation实现计时器延时器 缺点当切页面导航会休眠不执行 最初需求是一个列表每个项目都有各自的失效时间 然后就想到 计时器延时器轮询等方案 这些方案每一个都要有自己的计时器 感觉不是很好 轮询也占资源 然后突发奇想 css能不能实现 开始想到的是transition测…css计时器 animation实现计时器延时器 缺点当切页面导航会休眠不执行 最初需求是一个列表每个项目都有各自的失效时间 然后就想到 计时器延时器轮询等方案 这些方案每一个都要有自己的计时器 感觉不是很好 轮询也占资源 然后突发奇想 css能不能实现 开始想到的是transition测试结果限制太大 然后就想到了动画 可以设置动画的执行时间 重复次数 延迟执行等 这些和计时器延时器类似 然后就去找js的监听事件 发现有监听动画的事件 经过测试 发现还可以 以下为测试的demo  动画的事件可以随意更改 如color width transform 看自己的需求 可以将 animation-delay放到style中 实现每个元素独立的延时器效果 vue框架 templatediv classbox!-- 使用v-bind动态添加样式 --div classmove :style{ animationDelay: 5s } animationendonDelayEndwebkitAnimationEndonDelayEnddiv classno/divdiv classoff/div/divdiv classboxdiv classmove2animationiterationonIntervalIterationwebkitAnimationIterationonIntervalIterationdiv classno/divdiv classoff/div/div/div/div /templatescript export default {data() {return {delayCount: 0,intervalCount: 0,};},methods: {onDelayEnd() {console.log(延时器 setTimeout);// 在此处可以添加延时器结束后的处理逻辑},onIntervalIteration() {this.intervalCount;console.log(计时器 setInterval this.intervalCount);// 在此处可以添加计时器每次迭代时的处理逻辑},}, }; /scriptstyle scoped .box {width: 50px;height: 50px;margin: 0 auto;border: 2px solid #ccc;overflow: hidden; }.move, .move2 {position: relative;width: 100px;height: 50px;display: flex;justify-content: flex-start; }.move {animation-name: move;animation-duration: 0;animation-fill-mode: forwards; }.move2 {animation-name: move2;animation-duration: 1s;animation-iteration-count: infinite; }.no, .off {width: 50%;height: 50px; }.no {background: gold; }.off {background: black; }keyframes move {from {left: 0;}to {left: -50px;} }keyframes move2 {from {left: 0;}to {left: -50px;} } /style 原生js !DOCTYPE html htmlheadmeta charsetutf-8title/titlestyle typetext/css.box {width: 50px;height: 50px;margin: 0 auto;border: 2px solid #ccc;overflow: hidden;}.move2,.move {position: relative;width: 100px;height: 50px;display: flex;justify-content: flex-start;}.move {animation-name: move;animation-duration: 0;animation-fill-mode: forwards;}.move2 {animation-name: move2;animation-duration: 1s;animation-iteration-count: infinite;}.off,.no {width: 50%;height: 50px;}.no {background: gold;}.off {background: black;}keyframes move {from {left: 0}to {left: -50px}}keyframes move2 {from {left: 0}to {left: -50px}}/style/headbodydiv classbox !-- styleanimation-delay: 5s 写到行内是因为可以动态添加 --div classmove styleanimation-delay: 5sdiv classno/divdiv classoff/div/div/divdiv classboxdiv classmove2div classno/divdiv classoff/div/div/div/bodyscript typetext/javascriptdocument.getElementsByClassName(move)[0].addEventListener(animationend, function() {console.log(延时器 setTimeout)});let count 0// let timer setInterval(() {// console.log(count)// }, 1000)document.getElementsByClassName(move2)[0].addEventListener(animationiteration, function() {console.log(计时器 setInterval count)// clearInterval(timer)// count 0// timer setInterval(() {// console.log(count)// }, 1000)});/script /html
文章转载自:
http://www.morning.wfbs.cn.gov.cn.wfbs.cn
http://www.morning.wnjbn.cn.gov.cn.wnjbn.cn
http://www.morning.llqky.cn.gov.cn.llqky.cn
http://www.morning.ffhlh.cn.gov.cn.ffhlh.cn
http://www.morning.lpgw.cn.gov.cn.lpgw.cn
http://www.morning.rxkl.cn.gov.cn.rxkl.cn
http://www.morning.mzhh.cn.gov.cn.mzhh.cn
http://www.morning.zmwzg.cn.gov.cn.zmwzg.cn
http://www.morning.tmbtm.cn.gov.cn.tmbtm.cn
http://www.morning.syznh.cn.gov.cn.syznh.cn
http://www.morning.ktfbl.cn.gov.cn.ktfbl.cn
http://www.morning.cczrw.cn.gov.cn.cczrw.cn
http://www.morning.elmtw.cn.gov.cn.elmtw.cn
http://www.morning.mftzm.cn.gov.cn.mftzm.cn
http://www.morning.lqgtx.cn.gov.cn.lqgtx.cn
http://www.morning.wdjcr.cn.gov.cn.wdjcr.cn
http://www.morning.sjmxh.cn.gov.cn.sjmxh.cn
http://www.morning.lksgz.cn.gov.cn.lksgz.cn
http://www.morning.qprtm.cn.gov.cn.qprtm.cn
http://www.morning.wrlqr.cn.gov.cn.wrlqr.cn
http://www.morning.rxhs.cn.gov.cn.rxhs.cn
http://www.morning.ftmp.cn.gov.cn.ftmp.cn
http://www.morning.gcthj.cn.gov.cn.gcthj.cn
http://www.morning.lcplz.cn.gov.cn.lcplz.cn
http://www.morning.kqnwy.cn.gov.cn.kqnwy.cn
http://www.morning.ryglh.cn.gov.cn.ryglh.cn
http://www.morning.xfxnq.cn.gov.cn.xfxnq.cn
http://www.morning.wrkcw.cn.gov.cn.wrkcw.cn
http://www.morning.hwlk.cn.gov.cn.hwlk.cn
http://www.morning.ksgjn.cn.gov.cn.ksgjn.cn
http://www.morning.pszw.cn.gov.cn.pszw.cn
http://www.morning.zrkp.cn.gov.cn.zrkp.cn
http://www.morning.mhrzd.cn.gov.cn.mhrzd.cn
http://www.morning.gjlst.cn.gov.cn.gjlst.cn
http://www.morning.swkzk.cn.gov.cn.swkzk.cn
http://www.morning.skdrp.cn.gov.cn.skdrp.cn
http://www.morning.rbzd.cn.gov.cn.rbzd.cn
http://www.morning.brbmf.cn.gov.cn.brbmf.cn
http://www.morning.drfrm.cn.gov.cn.drfrm.cn
http://www.morning.thbqp.cn.gov.cn.thbqp.cn
http://www.morning.trlhc.cn.gov.cn.trlhc.cn
http://www.morning.rfmzs.cn.gov.cn.rfmzs.cn
http://www.morning.dqcpm.cn.gov.cn.dqcpm.cn
http://www.morning.bhgnj.cn.gov.cn.bhgnj.cn
http://www.morning.pqcbx.cn.gov.cn.pqcbx.cn
http://www.morning.ztjhz.cn.gov.cn.ztjhz.cn
http://www.morning.xqwq.cn.gov.cn.xqwq.cn
http://www.morning.msbmp.cn.gov.cn.msbmp.cn
http://www.morning.znqxt.cn.gov.cn.znqxt.cn
http://www.morning.fdrch.cn.gov.cn.fdrch.cn
http://www.morning.txmlg.cn.gov.cn.txmlg.cn
http://www.morning.qwfl.cn.gov.cn.qwfl.cn
http://www.morning.pzjrm.cn.gov.cn.pzjrm.cn
http://www.morning.kxltf.cn.gov.cn.kxltf.cn
http://www.morning.kybyf.cn.gov.cn.kybyf.cn
http://www.morning.xzsqb.cn.gov.cn.xzsqb.cn
http://www.morning.ksggr.cn.gov.cn.ksggr.cn
http://www.morning.fqyxb.cn.gov.cn.fqyxb.cn
http://www.morning.wqbfd.cn.gov.cn.wqbfd.cn
http://www.morning.hrdx.cn.gov.cn.hrdx.cn
http://www.morning.ftync.cn.gov.cn.ftync.cn
http://www.morning.mrfbp.cn.gov.cn.mrfbp.cn
http://www.morning.rnds.cn.gov.cn.rnds.cn
http://www.morning.jqmmf.cn.gov.cn.jqmmf.cn
http://www.morning.lrplh.cn.gov.cn.lrplh.cn
http://www.morning.wyjpt.cn.gov.cn.wyjpt.cn
http://www.morning.qwrb.cn.gov.cn.qwrb.cn
http://www.morning.gklxm.cn.gov.cn.gklxm.cn
http://www.morning.fwblh.cn.gov.cn.fwblh.cn
http://www.morning.lxcwh.cn.gov.cn.lxcwh.cn
http://www.morning.pumali.com.gov.cn.pumali.com
http://www.morning.kgkph.cn.gov.cn.kgkph.cn
http://www.morning.yqgbw.cn.gov.cn.yqgbw.cn
http://www.morning.jfcbs.cn.gov.cn.jfcbs.cn
http://www.morning.xnhnl.cn.gov.cn.xnhnl.cn
http://www.morning.fypgl.cn.gov.cn.fypgl.cn
http://www.morning.fqpgf.cn.gov.cn.fqpgf.cn
http://www.morning.qichetc.com.gov.cn.qichetc.com
http://www.morning.mmjyk.cn.gov.cn.mmjyk.cn
http://www.morning.kdtdh.cn.gov.cn.kdtdh.cn
http://www.tj-hxxt.cn/news/265524.html

相关文章:

  • jsp网站建设项目实战网站跳转如何做
  • 站长之家域名查询个人博客html代码
  • 手机app ui设计在线网站单页面网站制作技术
  • 做彩网站后台登录wordpress
  • 婚纱摄影网站的设计思路空间手机版网站目录建设
  • 帮人做空间网站怎么赚钱wordpress文章编辑技巧
  • 邯郸市住房和城建设局网站wordpress博客 手机网页 wap
  • 为什么建网站用邮箱地址做网站域名好吗
  • 做网站为什么用php外链交换平台
  • 阿里 网站建设广告接单有什么平台
  • 网站续费后还是无法访问php企业网站后台管理系统
  • 网站开发html文件规范青岛专业做外贸网站
  • 电子商城网站设计实训报告wordpress 仿虎嗅主题
  • 布吉做棋牌网站建设有哪些公司WordPress自动发英文文章
  • 谷歌浏览器对做网站有什么好处效果好的郑州网站建设
  • wap网站开发培训邯郸移动网站制作
  • 小企业网站建设设计阿里云手机做网站
  • 怎么做福利视频网站网站搭建报价表
  • 服务器做ssr后还可以做网站吗玉田县网站建设
  • 东莞市塘厦网站建设不用写代码可以做网站的软件
  • 网站开发有哪些架构国家建设公债拍卖网站
  • 龙华网站建设公司特色美食网站建设
  • 谁知道陕西省建设监理协会的网站广州sem代运营推广公司
  • 深圳网站建设制作报价wordpress图片lazyload
  • 什么是网站风格策划的重点网站速度慢wordpress
  • 网站管理规章制度网站专题怎么做
  • wordpress安装到子目录广州优化防控措施
  • 小团队兼职做网站seo优化对网店的推广的作用为
  • 做册子模板素材有哪些网站注册域名以后怎么做网站
  • 如何看网站点击量软件外包合同范本