刷面经时刷到的一道题,平时没怎么看,原来animation有个属性animation-play-state,要停止动画只要设置一个监听事件把animation-play-state:running改成animation-play-state:pasued就行了
参考https://www.w3school.com.cn/cssref/pr_animation-play-state.asp
css动画属性animation停止动画
最新推荐文章于 2022-10-15 10:02:01 发布
刷面经时刷到的一道题,平时没怎么看,原来animation有个属性animation-play-state,要停止动画只要设置一个监听事件把animation-play-state:running改成animation-play-state:pasued就行了
参考https://www.w3school.com.cn/cssref/pr_animation-play-state.asp