https://github.com/inorganik/countUp.js
target
= 目标元素的 ID;startVal
= 开始值;endVal
= 结束值;decimals
= 小数位数,默认值是0;duration
= 动画延迟秒数,默认值是2;
1
2
|
var demo = new countUp( "myTargetElement" , 24.02, 94.62, 2, 2.5); demo.start(); |
原文:https://www.cnblogs.com/jiayeyuan/p/10165474.html