HTML DOM Style animationDirection property
Examples
Change the <div> element animationDirection attributes:
document.getElementById("myDIV").style.animationDirection="reverse";
try it"
Definition and Usage
animationDirection property sets or returns whether alternating cycle reverse animation.
Note: If themovie is set to play only once, this property will not work.
Browser Support
Only Firefox supports animationDirection property.
grammar
Back animationDirection properties:
object .style.animationDirection
Setting animationDirection properties:
object .style.animationDirection="normal|reverse|alternate|alternate-reverse|initial|inherit"
Property Value
值 | 描述 |
---|---|
normal | 默认值。动画按正常播放。 |
reverse | 动画反向播放。 |
alternate | 动画在奇数次(1、3、5...)正向播放,在偶数次(2、4、6...)反向播放。 |
alternate-reverse | 动画在奇数次(1、3、5...)反向播放,在偶数次(2、4、6...)正向播放。 |
initial | 设置该属性为它的默认值。请参阅 initial 。 |
inherit | 从父元素继承该属性。请参阅 inherit 。 |
technical details
Defaults: | normal |
---|---|
return value: | String representing the animation-direction property element. |
CSS version | CSS3 |
related articles
CSS Reference Manual: Animation-direction property