jquery-数字渐变

来源:互联网 发布:windows7优化加速 编辑:程序博客网 时间:2024/05/22 15:25

基于jquery的animate

$(this).attr('nums', 10).animate({    nums: 100}, {    duration: 1000,    easing: 'swing',    step: re => console.log(Math.ceil(re).toLocaleString())});

效果为数字从10渐变到100,用时1秒,在step中输出re为中间的结果,可自由处理

0 0
原创粉丝点击