这篇翻译不完整。请帮忙从英语翻译这篇文章。
这是一个实验中的功能
此功能某些浏览器尚在开发中,请参考浏览器兼容性表格以得到在不同浏览器中适合使用的前缀。由于该功能对应的标准文档可能被重新修订,所以在未来版本的浏览器中该功能的语法和行为可能随之改变。
Summary 概要
animation-iteration-count CSS 属性 定义动画在结束前运行的次数 可以是1次 无限循环.
默认属性 animation 默认播放动画循环一次.
| 初始值 | 1 |
|---|---|
| 适用元素 | all elements, ::before and ::after pseudo-elements |
| 是否是继承属性 | 否 |
| 适用媒体 | visual |
| 计算值 | as specified |
| 是否适用于 CSS 动画 | 否 |
| 正规顺序 | the unique non-ambiguous order defined by the formal grammar |
Syntax
animation-iteration-count: infinite; animation-iteration-count: 3; animation-iteration-count: 2.3; animation-iteration-count: 2, 0, infinite;
Values
infinite- 无限循环播放动画.
<number>- 动画播放的次数 不可为负值. 可以用小数定义循环(
0.5将播放动画到关键帧的一半(from 0 ~ 50%).
Formal syntax
<single-animation-iteration-count>#where
<single-animation-iteration-count> = infinite | <number>
Examples
去看 CSS animations for examples. 点击链接去看栗(例)子
Specifications 说明 用法
| Specification | Status | Comment |
|---|---|---|
| CSS Animations animation-iteration-count |
Working Draft | Initial definition |
Browser compatibility 兼容性
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
|---|---|---|---|---|---|
| Basic support | (Yes)-webkit 43.0 |
5.0 (5.0)-moz 16.0 (16.0) |
10 | 12 -o 12.10 |
4.0-webkit |
| Feature | Android | Chrome | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile | Chrome for Android |
|---|---|---|---|---|---|---|---|
| Basic support | (Yes)-webkit | ? | 5.0 (5.0)-moz 16.0 (16.0) |
? | ? | ? | 43.0 |