依赖于jQuery誊写
<div id="jk-countdown"></div>
<div id="jk-countdown">
<div>
<span class="show" >1</span>
<span class="add" >2</span>
</div>
<div>
<span class="show" >1</span>
<span class="add" ">2</span>
</div>
......
</div>
$('#jk-countdown').jkcount({
num:112,
step:3,
speed:100,
type:'down',
addAnimate:{'top':30},
removeAnimate:{'top':0},
callback:function(){
console.log('done!');
}
});
- num:需要倒数的数字大小
- speed:倒数的时间间隔
- type:add || down 增计时,倒计时
- step:每次增加或减少多少单位
- addAnimate:.add的动画
- removeAnimate:.show的移除动画
- callback:执行完毕回调函数