JSRUN 用代码说话

animation-play-state 属性

编辑教程

animation-play-state 属性

定义和用法

animation-play-state :设置是否运行或暂停动画。

注释:可以在 JavaScript 中使用该属性,这样就能在播放过程中暂停动画。

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

语法

animation-play-state: paused|running;
描述
paused 动画已暂停。
running 默认值, 动画正在运行。

实例

暂停动画:

div
{
animation-play-state:paused;
-webkit-animation-play-state:paused; /* Safari 和 Chrome */
}

浏览器支持

属性 Chrome IE Firefox Safari Opera
animation-play-state 43.0
4.0 -webkit-
10.0 16.0
5.0 -moz-
9.0
4.0 -webkit-
30.0
15.0 -webkit-
12.0 -o-

Internet Explorer 10、Firefox 以及 Opera 支持 animation-play-state 属性。

Safari 和 Chrome 支持替代的 -webkit-animation-play-state 属性。

注释:Internet Explorer 9 以及更早的版本不支持 animation-play-state 属性。

JSRUN闪电教程系统是国内最先开创的教程维护系统, 所有工程师都可以参与共同维护的闪电教程,让知识的积累变得统一完整、自成体系。 大家可以一起参与进共编,让零散的知识点帮助更多的人。
X
支付宝
9.99
无法付款,请点击这里
金额: 0
备注:
转账时请填写正确的金额和备注信息,到账由人工处理,可能需要较长时间
如有疑问请联系QQ:565830900
正在生成二维码, 此过程可能需要15秒钟