aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/css/animation-direction
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/css/animation-direction
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/css/animation-direction')
-rw-r--r--files/zh-cn/web/css/animation-direction/index.html83
1 files changed, 83 insertions, 0 deletions
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
+---
+<div>{{CSSRef}}</div>
+
+<div>{{SeeCompatTable}}</div>
+
+<h2 id="概述">概述</h2>
+
+<p><code>animation-direction</code> CSS 属性指示动画是否反向播放,它通常在简写属性{{cssxref("animation")}}中设定</p>
+
+<p>{{cssinfo}}</p>
+
+<h2 id="语法">语法</h2>
+
+<pre class="twopartsyntaxbox"><a href="/en-US/docs/CSS/Value_definition_syntax" title="CSS/Value_definition_syntax">Formal syntax</a>: {{csssyntax("animation-direction")}}
+</pre>
+
+<pre>animation-direction: normal
+animation-direction: reverse
+animation-direction: alternate
+animation-direction: alternate-reverse
+animation-direction: normal, reverse
+animation-direction: alternate, reverse, normal
+</pre>
+
+<h3 id="值">值</h3>
+
+<dl>
+ <dt><code>normal</code></dt>
+ <dd><code>每个循环内动画向前循环,换言之,每个动画循环结束,动画重置到起点重新开始,这是默认属性。</code></dd>
+ <dt><code>alternate</code></dt>
+ <dd><code>动画交替反向运行,反向运行时,动画按步后退,同时,</code><span style="line-height: 1.5;">带时间功能的函数也反向,比如,ease-in 在反向时成为ease-out。计数取决于开始时是奇数迭代还是偶数迭代</span></dd>
+ <dt><code>reverse</code></dt>
+ <dd><font face="Courier New, Andale Mono, monospace"><span style="line-height: normal;">反向运行动画,每周期结束动画由尾到头运行。</span></font></dd>
+ <dt><code>alternate-reverse</code></dt>
+ <dd><code>反向交替, 反向开始交替</code></dd>
+ <dd>动画第一次运行时是反向的,然后下一次是正向,后面依次循环。决定奇数次或偶数次的计数从1开始。</dd>
+</dl>
+
+<h2 id="例子">例子</h2>
+
+<p>See <a href="/en-US/docs/CSS/CSS_animations" title="CSS/CSS_animations">CSS animations</a> for examples.</p>
+
+<h2 id="Specifications">Specifications</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('CSS3 Animations', '#animation-direction', 'animation-direction')}}</td>
+ <td>{{Spec2('CSS3 Animations')}}</td>
+ <td>For the two new values, see the <a href="http://lists.w3.org/Archives/Public/www-style/2011May/0090.html">W3C discussion</a>.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+
+
+<p>{{Compat("css.properties.animation-direction")}}</p>
+
+<h2 id="更多">更多</h2>
+
+<ul>
+ <li><a href="/en-US/docs/CSS/Tutorials/Using_CSS_animations" title="Tutorial about CSS animations">Using CSS animations</a></li>
+ <li>{{domxref("AnimationEvent", "AnimationEvent")}}</li>
+</ul>