@sammffl
2016-02-19T02:05:00.000000Z
字数 571
阅读 1071
前端插件
滚动计数
var options = {useEasing: true,useGrouping: true,separator: ',',decimal: '.',prefix: '',suffix: ''};var countObj = new CountUp("counter-registers" , 0, 1000, 0, 0.5, options);countObj.start();
- target = id of html element, input, svg text element, or var of previously selected element/input where counting occurs
- startVal = the value you want to begin at
- endVal = the value you want to arrive at
- decimals = (optional) number of decimal places in number, default 0
- duration = (optional) duration in seconds, default 2
- options = (see demo, optional) formatting/easing options object