CSS animation-play-state 属性,设置动画暂停或运行状态

 2022-05-30    638  

CSS animation-play-state 属性,设置动画暂停或运行状态

实例

CSS animation-play-state 属性,设置动画暂停或运行状态

暂停动画:

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

定义和用法

animation-play-state 属性规定动画正在运行还是暂停。

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

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

语法

animation-play-state: paused|running;
描述
paused 规定动画已暂停。
running 规定动画正在播放。


animation-play-state 属性。

  •  标签:  

原文链接:https://77isp.com/post/1028.html

=========================================

https://77isp.com/ 为 “云服务器技术网” 唯一官方服务平台,请勿相信其他任何渠道。