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-duration/index.html | 125 ++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 files/zh-cn/web/css/animation-duration/index.html (limited to 'files/zh-cn/web/css/animation-duration') diff --git a/files/zh-cn/web/css/animation-duration/index.html b/files/zh-cn/web/css/animation-duration/index.html new file mode 100644 index 0000000000..13493d5151 --- /dev/null +++ b/files/zh-cn/web/css/animation-duration/index.html @@ -0,0 +1,125 @@ +--- +title: animation-duration +slug: Web/CSS/animation-duration +tags: + - CSS + - CSS Animations + - CSS Property + - Experimental + - Reference +translation_of: Web/CSS/animation-duration +--- +
{{ CSSRef() }}{{ SeeCompatTable() }}
+ +

概述

+ +

animation-duration属性指定一个动画周期的时长。

+ +

默认值为0s,表示无动画。

+ +

使用简写属性{{cssxref("animation")}}很方便地同时设置所有的动画属性。

+ +

{{cssinfo}}

+ +

语法

+ +
Formal syntax: {{csssyntax("animation-duration")}}
+
+ +
animation-duration: 6s
+animation-duration: 120ms
+animation-duration: 1s, 15s
+animation-duration: 10s, 30s, 230ms
+
+ +

+ +
+
<time>
+
一个动画周期的时长,单位为秒(s)或者毫秒(ms),无单位值无效。
+
+ +
注意:负值无效,浏览器会忽略该声明,但是一些早期的带前缀的声明会将负值当作0s。
+ +

示例

+ +

See CSS animations for examples.

+ +

标准

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{ SpecName('CSS3 Animations', '#animation-duration', 'animation-duration') }}{{ Spec2('CSS3 Animations') }}
+ +

浏览器兼容

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support3.0{{ property_prefix("-webkit") }}{{ CompatGeckoDesktop("5.0") }}{{ property_prefix("-moz") }}
+ {{ CompatGeckoDesktop("16.0") }}
1012{{ property_prefix("-o") }}
+ 12.10 #
4.0{{ property_prefix("-webkit") }}
+
+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureAndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Basic support2.0{{ property_prefix("-webkit") }}{{ CompatGeckoMobile("5.0") }}{{ property_prefix("-moz") }}
+ {{ CompatGeckoMobile("16.0") }}
{{ CompatNo() }}{{ CompatNo() }}4.2{{ property_prefix("-webkit") }}
+
+ +

See also

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