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

Summary 概要

+ +

animation-iteration-count CSS 属性   定义动画在结束前运行的次数 可以是1次 无限循环.

+ +

如果指定了多个值,每次播放动画时,将使用列表中的下一个值,在使用最后一个值后循环回第一个值。

+ +

通常情况下,使用animation简写属性,来一次性设置所有动画属性会更方便。

+ +
{{EmbedInteractiveExample("pages/css/animation-iteration-count.html")}}
+ + + +

Syntax 语法

+ +
/* 值为关键字 */
+animation-iteration-count: infinite;
+
+/* 值为数字 */
+animation-iteration-count: 3;
+animation-iteration-count: 2.4;
+
+/* 指定多个值 */
+animation-iteration-count: 2, 0, infinite;
+
+ +

animation-iteration-count 属性可以指定一个或多个以逗号分隔的值。

+ +

Values 属性值

+ +
+
infinite
+
无限循环播放动画.
+
<number>
+
动画播放的次数;默认值为1。可以用小数定义循环,来播放动画周期的一部分:例如,0.5 将播放到动画周期的一半。不可为负值。
+
+ +

Formal syntax 

+ +
{{csssyntax}}
+ +

Examples 示例

+ +

去看 CSS animations for examples. 点击链接去看栗(例)子

+ +

Specifications 说明 用法

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{ SpecName('CSS3 Animations', '#animation-iteration-count', 'animation-iteration-count') }}{{ Spec2('CSS3 Animations') }}Initial definition
+ +

Browser compatibility 兼容性

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support{{ CompatVersionUnknown() }}{{ property_prefix("-webkit") }}
+ {{CompatChrome(43.0)}}
{{ CompatGeckoDesktop("5.0") }}{{ property_prefix("-moz") }}
+ {{ CompatGeckoDesktop("16.0") }}
10 12 {{ property_prefix("-o") }}
+ 12.10
4.0{{ property_prefix("-webkit") }}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChromeFirefox Mobile (Gecko)IE PhoneOpera MobileSafari MobileChrome for Android
Basic support{{ CompatVersionUnknown() }}{{ property_prefix("-webkit") }}{{CompatUnknown}}{{ CompatGeckoMobile("5.0") }}{{ property_prefix("-moz") }}
+ {{ CompatGeckoMobile("16.0") }}
{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}{{CompatChrome(43.0)}}
+  
+
+ +

See also

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