--- title: animation-direction slug: Web/CSS/animation-direction tags: - CSS - CSS Animations - CSS Property - Experimental - Reference translation_of: Web/CSS/animation-direction ---
animation-direction
CSS 属性指示动画是否反向播放,它通常在简写属性{{cssxref("animation")}}中设定
{{cssinfo}}
Formal syntax: {{csssyntax("animation-direction")}}
animation-direction: normal animation-direction: reverse animation-direction: alternate animation-direction: alternate-reverse animation-direction: normal, reverse animation-direction: alternate, reverse, normal
normal
alternate
ease-in
在反向时成为 ease-out
。计数取决于开始时是奇数迭代还是偶数迭代reverse
alternate-reverse
See CSS animations for examples.
Specification | Status | Comment |
---|---|---|
{{SpecName('CSS3 Animations', '#animation-direction', 'animation-direction')}} | {{Spec2('CSS3 Animations')}} | For the two new values, see the W3C discussion. |
{{Compat("css.properties.animation-direction")}}