ios - 背景图片缩放 iOS

标签 ios css

我是一名初级 Web 开发人员,我的横幅背景图片无法在 iOS 设备上正确显示。这是我的 CSS

.banner-section {
  height: 100vh;
  background: url('../assets/img/paul_bh.png') no-repeat center center fixed;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: var(--leo-blue);
}
有没有解决这个问题的方法,在此先感谢,repo 和 gh-pages 在下面..

https://github.com/alsmith808/leonid

https://alsmith808.github.io/leonid/

最佳答案

只是一个想法,也许可以尝试添加:

display: -webkit-box; 
display: -moz-box;       
display: -ms-flexbox;     
display: -webkit-flex;     
display: flex;  

我在这里阅读:https://css-tricks.com/using-flexbox/

关于ios - 背景图片缩放 iOS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48790064/

相关文章:

ios - 无法使用核心数据从 DynamoDB 获取相关项目

ios - 如何在 iPhone 中使用 unicode 显示空心子弹

iphone - 从 App Delegate 调用时 PushViewController 不起作用

javascript - 提交时,将 html 弹出文件加载到 div 中

html - 基于 div 的表格中的不同上边距

jquery - html anchor 跳转到顶部

jquery - slider 未居中,段落显示与段落重叠

ios - Xcode 7.2 找不到匹配的配置文件

iphone - iOS 上的折线图

HTML 净化器 : allow user styling