html - Safari (iPhone) 上未显示 Gif 背景
问题描述
我有一个 gif 作为我网站上第一个 div 的背景。出于某种原因,背景不会出现在 safari(移动设备)上,但它在移动设备上的所有其他浏览器上都可以正常工作。gif 也会出现在桌面上的 safari 上。
我的 CSS:
@media screen and (max-width: 960px){
.introsection {
background-size: 100% !important;
-webkit-background-size: 100%;
-moz-background-size: 100%;
-o-background-size: 100%;
}
}
.introsection {
position: relative;
align-items: center;
justify-content: center;
width: 100vw;
height: 100vh;
background: url('../../assets/img/calm_logo.gif') no-repeat center;
background-attachment: fixed;
background-color: #fff;
z-index: 99999;
}
解决方案
推荐阅读
- java - 重启线程无法暂停
- java - Websocket 连接尝试失败,返回“连接:升级,关闭”。
- google-calendar-api - 错误:未设置访问、刷新令牌或 API 密钥
- docker - TeamCity CI 的 VMware 或 Docker 容器
- asp.net - 非法文件路径
- javascript - 如何将 jQuery 函数存储在对象中以供以后访问?
- javascript - js理解箭头符号三元运算符
- ios - 在 MVVM 中设置委托的正确方法
- javascript - 使用 Mixins 在 API 调用中的所有 Vue.js 组件中使用常量数据
- android - 多个片段中的 RecyclerView