扫码关注官方订阅号
我想做兼容safari,但是写上@-webkit-transform没有效果,这段动画代码是用js添加的,前面那个添加动画@-webkit-keyframes,可以兼容safari,但是后面的动画效果不能兼容safari,这该怎么兼容呢?谢谢了
业精于勤,荒于嬉;行成于思,毁于随。
你如果是js写完动画插入到dom中的话,最好设置元素的animation-play-state属性:
animation-play-state
{ animation-play-state:running; -webkit-animation-play-state:state:running; }
另外设置animation的时候也要加上-webkit-前缀
animation
-webkit-
{ animation: she1 xxx xxx; -webkit-animation: she1 xxx xxx; }
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
扫描下载App
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
你如果是js写完动画插入到dom中的话,最好设置元素的
animation-play-state
属性:另外设置
animation
的时候也要加上-webkit-
前缀