动画CSS无法在Safari浏览器中工作
animation: shine 4s linear infinite;
@keyframes shine {
0% {
background-position-x: -500%;
}
100% {
background-position-x: 500%;
}
}
我在react js网页中使用这种风格。它适用于除 Safari 浏览器之外的所有浏览器,我不知道为什么。
Safari 浏览器未显示该动画文本。
任何人都可以帮助解决此问题
animation: shine 4s linear infinite;
@keyframes shine {
0% {
background-position-x: -500%;
}
100% {
background-position-x: 500%;
}
}
I use this style in react js web page. Its work all browser except safari browser i dont know why.
Safari browser didn't display that animation text.
Any one help to solve this problem
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
找到了解决方案。在 Safari 中,当您使用关键帧时,您需要使用整个百分比:
这不会起作用:
这会:
不知道为什么,但这就是 Safari 的工作方式! :)
Found the solution. In Safari when you use Keyframes you need to use the whole percentage:
this won't work:
this will:
Don't know why but that's the way Safari works! :)