html keyframes无效,keyframes + animation没有效果

博主分享了一段CSS3动画代码,但发现即使在360浏览器(WebKit内核)下,@-webkit-keyframes定义的旋转动画并未生效。文章将探讨可能的原因及解决方法,适合前端开发者排查常见问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

@-webkit-keyframes change{

0%{ transform:rotate(0deg);}

10%{ transform:rotate(3deg);}

20%{ transform:rotate(-3deg);}

30%{ transform:rotate(2deg);}

40%{ transform:rotate(-2deg);}

50%{ transform:rotate(1deg);}

60%{ transform:rotate(-1deg);}

70%{ transform:rotate(0deg);}

100%{ transform:rotate(0deg);}

}

.text{width:400px;height:400px;background:url('./img/zz.png') no-repeat;position:absolute;top:200px;left:500px;}

.change{-webkit-animation: change 2s infinite;}

这段代码怎么没有效果?(用的360浏览器,webkit内核)?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值