javascript - 我的 HTML CSS 代码不适用于 Safari,但适用于所有其他浏览器
问题描述
我为我的客户网站创建了一个动画卡,但是 html css 代码在 safari(在移动设备上)上不起作用,而它在 Chrome、Firefox 上正常工作。我还添加了 -webkit-animation: 以实现浏览器兼容性。它在安卓浏览器上运行良好,但在 iPhone Safari 动画中不起作用。下面是我的css代码。我无法理解问题所在。
<div class="container">
<div class="col-xs-12 col-sm-6 col-md-4 wow fadeInLeft">
<div class="service-box icon-box iconbox-theme-colored bg-white p-30 mb-30 border-1px">
<a class="icon icon-dark border-left-theme-colored2-3px pull-left flip">
<i class="fa fa-cogs"></i>
</a>
<div class="icon-box-details" style="padding-top: 5px;font-family: 'VodafoneRg_0'">
<p style="font-weight: 600;font-size:20px ">MIDC <br>Solutions</p>
</div>
<p style="font-size: 20px">Expertise in giving Maharashtra Industrial Development Corporation Solutions & Services in relation to it.</p>
</div>
</div>
</div>
.icon-box {
margin-bottom: 30px;}
.service-box {
position: relative;
border-bottom: 3px solid transparent;
border-top: 0;}
.icon-box.iconbox-theme-colored .icon.icon-dark {
background-color: #ffcb05;
color: #383431;}
.icon-box.iconbox-theme-colored .icon {
color: #002E5B;}
.icon-box .icon.icon-dark {
background-color: #111111;
color: #fff;}
.icon-box .icon {
display: inline-block;
height: 70px;
margin-bottom: 0;
-webkit-animation: all 0.3s ease;
-moz-animation: all 0.3s ease;
-o-animation: all 0.3s ease;
width: 70px;
text-align: center;}
.border-left-theme-colored2-3px {
border-left: 3px solid #005aaa !important;}
.icon-box .icon i {
line-height: 70px;}
.icon-box i {
display: inline-block;
font-size: 40px;
-webkit-animation: all 0.3s ease;
-moz-animation: all 0.3s ease;
-o-animation: all 0.3s ease;}
.icon-box .icon-box-details {
margin-left: 80px;
font-family: 'VodafoneLt_0';
font-size: 18px;}
.service-box:after {
background: #005aaa;}
.service-box:after {
content: "";
height: 3px;
position: absolute;
left: 0;
bottom: -3px;
width: 0;
-webkit-animation: all 0.3s ease;
-moz-animation: all 0.3s ease;
-o-animation: all 0.3s ease;
-ms-animation: all 0.4s ease 0s;
transition: all 0.4s ease 0s;}
.service-box:hover:after {
width: 100%;
-webkit-animation:800ms ease all;}
解决方案
确保正确给出浏览器兼容性的所有前缀(提供代码以获得更多说明)
animation:
-webkit-animation:
-moz-animation:
-o-animation:
-ms-animation:
推荐阅读
- outlook - Outlook 桌面中的自适应卡操作错误,但在 OOTW 中没有
- javascript - 隐藏 `prototype` 属性以防止自定义函数覆盖本机函数
- javascript - 如何在 Node.Js 中组织与数据库的通信?
- c# - C#将多个单元格从Excel复制到同一列中的Word
- r - 按 customerID 和 YTD Sales 计算该客户的 3 个月平均值
- algorithm - 将边集合转换为三角形集合的算法
- php - 无法从 20 Mb 文件中获取文件大小()
- dynamics-crm - Dynamics 8.1 和 365:“Publisher”是否可移植用于托管解决方案?
- android - 如何为 64 位 Android 构建 cordova 项目?
- algorithm - 查找与单词查询匹配的顶级文档