animation-play-state

介绍

animation-play-state属性定义一个动画是否运行或者暂停。
恢复一个已暂停的动画,将从它开始暂停的时候,而不是从动画序列的起点开始在动画。

标准化语法

//默认值running
animation-name: running | paused;
1
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

与 Web 的区别

注意

扩展阅读

注意事项

  • 如果是动态设置的动画属性,需要在节点标记 flatten="false" 属性
  • 如果 iOS 显示效果不符合预期,在节点标记 implicit-animation="false" 属性
Last Updated: 2022/7/15 下午7:22:06