Blogger Information
Blog 20
fans 0
comment 0
visits 19648
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
好用的JQ数字滚动插件(带演示页面)
大鱼
Original
1136 people have browsed it

jquery 数字滚动方法
用的是countUp.js这个插件

target = 目标元素的 ID;
startVal = 开始值;
endVal = 结束值;
decimals = 小数位数,默认值是0;
duration = 动画延迟秒数,默认值是2;

1先初始化

  var options = {            useEasing: true,
         useGrouping: false,
         separator: ',',
         decimal: '.',
   };
   var demo = new CountUp('few', 0, 0, 0, 0.5, options);
   if (!demo.error) {          demo.start();
   } else {          console.error(demo.error);
   }

2更新

 demo.update(6000);

详细参数看http://inorganik.github.io/countUp.js/


原文出自:http://newmiracle.cn/?m=201804

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post