Javascript Animation API:每次迭代后调用一个函数

时间:2017-12-29 22:21:16

标签: javascript animation

我使用Javascript Element.animate() 创建无限滚动动画。

这是我的代码片段:



for(var i = 0; i < rows.length; i++){
var scroll = rows[i].animate([
  // keyframes
  { top: '-' + container.clientHeight + 'px' }, 
  { top: '600px' }
], { 
  // timing options
  duration: 10000,
  iterations: Infinity
});
}
&#13;
&#13;
&#13;

我的问题是,我可以在每次迭代后调用一个函数吗?

0 个答案:

没有答案
相关问题