CSS animation-play-state

127次阅读
没有评论

共计 619 个字符,预计需要花费 2 分钟才能阅读完成。

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 浏览器支持

CSS animation-play-stateCSS animation-play-stateCSS animation-play-stateCSS animation-play-stateCSS animation-play-state

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 */

在线运行

 

 

正文完