From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/css/animation-direction/index.html | 83 ++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 files/zh-cn/web/css/animation-direction/index.html (limited to 'files/zh-cn/web/css/animation-direction') diff --git a/files/zh-cn/web/css/animation-direction/index.html b/files/zh-cn/web/css/animation-direction/index.html new file mode 100644 index 0000000000..34194446db --- /dev/null +++ b/files/zh-cn/web/css/animation-direction/index.html @@ -0,0 +1,83 @@ +--- +title: animation-direction +slug: Web/CSS/animation-direction +tags: + - CSS + - CSS Animations + - CSS Property + - Experimental + - Reference +translation_of: Web/CSS/animation-direction +--- +
{{CSSRef}}
+ +
{{SeeCompatTable}}
+ +

概述

+ +

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
+
反向交替, 反向开始交替
+
动画第一次运行时是反向的,然后下一次是正向,后面依次循环。决定奇数次或偶数次的计数从1开始。
+
+ +

例子

+ +

See CSS animations for examples.

+ +

Specifications

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('CSS3 Animations', '#animation-direction', 'animation-direction')}}{{Spec2('CSS3 Animations')}}For the two new values, see the W3C discussion.
+ +

浏览器兼容性

+ + + +

{{Compat("css.properties.animation-direction")}}

+ +

更多

+ + -- cgit v1.2.3-54-g00ecf