css - CSS 旋转动画在 iOS 和 Mac 上的 Safari 上不旋转
问题描述
我想在加载时制作一个旋转动画,旋转在我的 Mac 上的 Chrome 上完美运行,但在我的 iPhone 上的 Chrome 和 iPhone 上的 Safari 浏览器上,它根本不旋转。
这是CSS:
div {
display: inline-block;
width: 50px;
height: 50px;
border: 3px solid rgba(195, 195, 195, 0.6);
border-radius: 50%;
border-top-color: #636767;
animation: spin 1s infinite linear;
-moz-animation:spin 1s infinite linear;
-webkit-animation: spin 1s infinite linear;
@keyframes spin {
0% { transform:rotate(0deg); }
50% { transform:rotate(180deg); }
100% { transform:rotate(360deg); }
}
@-webkit-keyframes spin {
0% { -webkit-transform:rotate(0deg); }
50% { -webkit-transform:rotate(180deg); }
100% { -webkit-transform:rotate(360deg); }
}
@-moz-keyframes spin {
0% { -moz-transform:rotate(0deg); }
50% { -moz-transform:rotate(180deg); }
100% { -moz-transform:rotate(360deg); }
}
}
我尝试定义更多这样描述的动画,但它没有帮助:
{
animation-name: spin;
animation-duration: 1s;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
你能帮我解决这个问题吗?
解决方案
推荐阅读
- reactjs - 使用 react-chartjs-2 的折线图图例边框样式
- java - 在托管 bean 上执行资源 *(spring bean)* 注入时发生错误
- mysql - Docker Compose 和 Mysql 不在本地主机上运行
- r - 在函数中指定方面的问题
- asp.net - 使用枚举列扩展身份表
- python - TypeError:只能将元组(不是“str”)连接到元组。小部件的问题
- azure - 是否可以以编程方式取消 Azure DevOps 管道作业?
- cloudkit - 是否保留了 CKAsset 图像元数据?
- ios - 如何在 Swift 中同时分别录制音频和视频
- javascript - 如何根据单击的按钮填写 HTML 表单的特定字段