animation-play-state
介绍
animation-play-state
属性定义一个动画是否运行或者暂停。
恢复一个已暂停的动画,将从它开始暂停的时候,而不是从动画序列的起点开始在动画。
标准化语法
//默认值running
animation-name: running | paused;
1
2
2
样例:
/* Single animation */
animation-play-state: running;
animation-play-state: paused;
/* Multiple animations */
animation-play-state: paused, running, running;
1
2
3
4
5
6
2
3
4
5
6
与 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"
属性