diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/css/transition-property | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/zh-cn/web/css/transition-property')
-rw-r--r-- | files/zh-cn/web/css/transition-property/index.html | 153 |
1 files changed, 153 insertions, 0 deletions
diff --git a/files/zh-cn/web/css/transition-property/index.html b/files/zh-cn/web/css/transition-property/index.html new file mode 100644 index 0000000000..90df96ad89 --- /dev/null +++ b/files/zh-cn/web/css/transition-property/index.html @@ -0,0 +1,153 @@ +--- +title: transition-property +slug: Web/CSS/transition-property +translation_of: Web/CSS/transition-property +--- +<div>{{CSSRef("CSS Transitions")}} {{SeeCompatTable}}</div> + +<h2 id="概述">概述</h2> + +<p><strong><code>transition-property</code></strong> 指定应用过渡属性的名称。</p> + +<div class="note"><strong>注意:</strong><a href="/en-US/docs/Web/CSS/CSS_animated_properties">可被用于动画的属性集合</a>文章近期将会变更,应该避免使用列表中出现的但目前没有动画的属性。否则,将会出现一些不可预料的结果。</div> + +<p>如果指定简写属性(比如 {{cssxref("background")}}),那么其完整版中所有可以动画的属性都会被应用过渡。</p> + +<div>{{cssinfo}}</div> + +<h2 id="语法">语法</h2> + +<pre class="brush: css">/* Keyword values */ +transition-property: none; +transition-property: all; +transition-property: test_05; +transition-property: -specific; +transition-property: sliding-vertically; + +transition-property: test1; +transition-property: test1, animation4; +transition-property: all, height, all; +transition-property: all, -moz-specific, sliding; + +/* Global values */ +transition-property: inherit; +transition-property: initial; +transition-property: unset; +</pre> + +<h3 id="值">值</h3> + +<dl> + <dt><code>none</code></dt> + <dd>没有过渡动画。</dd> + <dt><code>all</code></dt> + <dd>所有可被动画的属性都表现出过渡动画。</dd> + <dt><code>IDENT</code></dt> + <dd>属性名称。由小写字母 <code>a</code> 到 <code>z</code>,数字 <code>0</code> 到 <code>9</code>,下划线(<code>_</code>)和破折号(<code>-</code>)。第一个非破折号字符不能是数字。同时,不能以两个破折号开头。</dd> +</dl> + +<h3 id="正式语法">正式语法</h3> + +<pre class="syntaxbox">{{csssyntax}}</pre> + +<h2 id="示例">示例</h2> + +<p>在 <a href="/en-US/docs/Web/CSS/CSS_Transitions/Using_CSS_transitions">CSS transitions</a> 中有几个示例可以参考。</p> + +<h2 id="规范">规范</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">规范</th> + <th scope="col">状态</th> + <th scope="col">备注</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('CSS3 Transitions', '#transition-property', 'transition-property')}}</td> + <td>{{Spec2('CSS3 Transitions')}}</td> + <td>Initial definition</td> + </tr> + </tbody> +</table> + +<h2 id="浏览器兼容">浏览器兼容</h2> + +<div>{{CompatibilityTable}}</div> + +<div id="compat-desktop"> +<table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Chrome</th> + <th>Firefox (Gecko)</th> + <th>Internet Explorer</th> + <th>Opera</th> + <th>Safari</th> + </tr> + <tr> + <td>Basic support</td> + <td>{{CompatVersionUnknown}} {{property_prefix("-webkit")}}</td> + <td>{{CompatGeckoDesktop("2.0")}} {{property_prefix("-moz")}}<br> + {{CompatGeckoDesktop("16.0")}}</td> + <td>10</td> + <td>11.6{{property_prefix("-o")}}<br> + 12.10 <a href="http://my.opera.com/ODIN/blog/2012/08/03/a-hot-opera-12-50-summer-time-snapshot">#</a></td> + <td>{{CompatVersionUnknown}} {{property_prefix("-webkit")}}</td> + </tr> + <tr> + <td><code>IDENT value</code></td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>12.10 {{CompatNo}}</td> + <td>{{CompatNo}}</td> + </tr> + </tbody> +</table> +</div> + +<div id="compat-mobile"> +<table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Android</th> + <th>Chrome for Android</th> + <th>Firefox Mobile (Gecko)</th> + <th>IE Mobile</th> + <th>Opera Mobile</th> + <th>Safari Mobile</th> + </tr> + <tr> + <td>Basic support</td> + <td>{{CompatVersionUnknown}} {{property_prefix("-webkit")}}</td> + <td>{{CompatVersionUnknown}} {{property_prefix("-webkit")}}</td> + <td>{{CompatGeckoMobile("2.0")}} {{property_prefix("-moz")}}<br> + {{CompatGeckoMobile("16.0")}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatVersionUnknown}} {{property_prefix("-webkit")}}</td> + </tr> + <tr> + <td><code>IDENT value</code></td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatNo}}</td> + </tr> + </tbody> +</table> +</div> + +<h2 id="参考">参考</h2> + +<ul> + <li><a href="/Web/Guide/CSS/Using_CSS_transitions">Using CSS transitions</a></li> + <li>{{domxref("TransitionEvent")}}</li> +</ul> |