SetInterval is the key function.
setInterval是关键函数。
The steps-based animation that people try to use with setInterval code just ends up looking jerky.
用setInterval代码实现基于步骤的动画看起来有些抖动。
var id = setInterval(fn, delay); - Similar to setTimeout but continually calls the function (with a delay every time) until it is canceled.
varid =setInterval(fndelay);- 与setTimeout类似,只不过它会持续地调用指定的函数(每次都有一个延时),直到timer被取消为止。
var id = setInterval(fn, delay); - Similar to setTimeout but continually calls the function (with a delay every time) until it is canceled.
varid =setInterval(fndelay);- 与setTimeout类似,只不过它会持续地调用指定的函数(每次都有一个延时),直到timer被取消为止。
应用推荐