loopDelay V4 JS
定义循环之间的延迟,单位为毫秒。
接受
一个 Number
,其值等于或大于 0
默认值
0
要全局更改默认值,请更新 engine.defaults
对象。
import { engine } from 'animejs';
engine.defaults.loopDelay = 500;
loopDelay 代码示例
import { animate } from 'animejs';
const loopDelayAnimation = animate('.circle', {
x: '16rem',
scale: {
to: 1.8,
delay: 500,
duration: 500,
},
loopDelay: 1000,
loop: true,
alternate: true,
});
<div class="medium row">
<div class="circle"></div>
</div>