animation-iteration-count
介绍
用于设置播放动画的次数。
标准化语法
//默认值1
animation-iteration-count: <number> | infinite;
1
2
2
样例:
/* 值为关键字 */
animation-iteration-count: infinite;
/* 值为数字 */
animation-iteration-count: 3;
/* 指定多个值 */
animation-iteration-count: 2, 0, infinite;
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
与 Web 的区别
注意
animation
仅支持对transform, background-color, opacity做动画
扩展阅读
- animation
- animation-name
- animation-duration
- animation-timing-function
- animation-delay
- animation-iteration-count
- animation-direction
- animation-fill-mode
- animation-play-state
注意事项
- 如果是动态设置的动画属性,需要在节点标记
flatten="false"
属性 - 如果 iOS 显示效果不符合预期,在节点标记
implicit-animation="false"
属性