CSS animation-play-state

css animation-play-state 定义与用法

animation--play-state属性指定动画是否正在运行或已暂停。

注意:在JavaScript中使用此属性在一个周期中暂停动画。

默认值: running
继承: no
版本: CSS3
JavaScript 语法: object object.style.animationPlayState="paused"

 

css animation-play-state 语法

animation-play-state: paused|running;

 

css animation-play-state 属性值

描述
paused 指定暂停动画
running 指定正在运行的动画

 

css animation-play-state 浏览器支持

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Internet Explorer 10, Firefox, 和 Opera支持animation-play-state 属性

Safari和Chrome通过私有属性 -webkit-animation-play-state支持。

注意: Internet Explorer 9及更早IE版本不支持animation-timing-function属性。

 

css animation-play-state 实例

暂停动画:

animation-play-state:paused;
-webkit-animation-play-state:paused; /* Safari and Chrome */

在线运行

 

相关文章

CSS3 教程: CSS3 动画