CSS animation-direction property
Examples
Perform the animation again, and then back again to perform the animation:
animation-direction:alternate;
-webkit-animation-direction:alternate; /* Safari 和 Chrome */
-webkit-animation-direction:alternate; /* Safari 和 Chrome */
Browser Support
Figures in the table represent the first browser to support the version number of the property.
Immediately following the digital -webkit-, -ms- or -moz- ago in support of the prefix attribute first browser version number.
属性 | |||||
---|---|---|---|---|---|
animation-direction | 43.0 4.0 -webkit- |
10.0 | 16.0 5.0 -moz- |
9.0 4.0 -webkit- |
30.0 15.0 -webkit- 12.0 -o- |
Definition and Usage
animation-direction property defines whether the cycle of alternating reverse animation.
Note: If themovie is set to play only once, this property will not work.
Defaults: | normal |
---|---|
inherit: | no |
Can be animated: | no. Please refer to animation (Animatable) . |
version: | CSS3 |
JavaScript syntax: | object .style.animationDirection = "reverse"try |
CSS Syntax
animation-direction: normal|reverse|alternate|alternate-reverse|initial|inherit;
Property Value
值 | 描述 | 测试 |
---|---|---|
normal | 默认值。动画按正常播放。 | 测试 » |
reverse | 动画反向播放。 | 测试 » |
alternate | 动画在奇数次(1、3、5/en.)正向播放,在偶数次(2、4、6/en.)反向播放。 | 测试 » |
alternate-reverse | 动画在奇数次(1、3、5/en.)反向播放,在偶数次(2、4、6/en.)正向播放。 | 测试 » |
initial | 设置该属性为它的默认值。请参阅 initial 。 | |
inherit | 从父元素继承该属性。请参阅 inherit 。 |
related articles
CSS3 tutorial: CSS3 Animation (Animations)