delay
定义动画补间的默认延迟时间(毫秒)。
接受
- A
Numberequal or greater than0 - A Function based value that returns a
Numberequal to or greater than0
默认
0
要全局更改默认值,请更新 engine.defaults 对象。
import { engine } from 'animejs';
engine.defaults.delay = 500;
延迟代码示例
import { animate } from 'animejs';
const playbackDelay = animate('.delay', {
x: '16rem',
scale: 1.8,
delay: 500, // Global delay applied to all properties
loop: true,
alternate: true
});
<div class="medium row">
<div class="circle delay"></div>
</div>