HTML DOM Style animationDelay property
Examples
Change the <div> element animationDelay attributes:
document.getElementById("myDIV").style.animationDelay="1s";
try it"
Definition and Usage
animationDelay attribute defines when the animation starts.
AnimationDelay unit value may be seconds (s) or milliseconds (ms).
Note: Negative values are allowed, -2s means the animation will start right away, but starting from 2 seconds of the animation playback.
Browser Support
Only Firefox supports animationDelay property.
grammar
Back animationDelay properties:
object .style.animationDelay
Setting animationDelay properties:
object .style.animationDelay="time|initial|inherit"
Property Value
值 | 描述 |
---|---|
time | 可选的。定义动画开始前的秒数或毫秒数。默认值为 0。 |
initial | 设置该属性为它的默认值。请参阅 initial 。 |
inherit | 从父元素继承该属性。请参阅 inherit 。 |
technical details
Defaults: | 0 |
---|---|
return value: | String representing the animation-delay property element. |
CSS version | CSS3 |
related articles
CSS Reference Manual: Animation-Delay property