【发布时间】:2018-12-01 18:14:21
【问题描述】:
我的网站存在以下问题:
我有一个带有背景图片的英雄部分。它覆盖了背景并使用background-attachmend: fixed。这很有效,在我的桌面上看起来很漂亮。
而在我的 iPhone 上,背景非常模糊,而且背景不是固定的。如果我将其更改为默认值background-attachmend: scroll,则背景会以良好的质量显示图片的右侧部分。
如果背景是固定的,iPhone 上的背景有时会完全变黑,这取决于我是否使用background-size: cover。
我知道 iOS 不喜欢固定背景,但总得有办法解决这个问题吧?
希望你能帮助我!
编辑:
我的 <section> "home" 的 Css 代码
width: 100%;
height: 100%;
background-color: #151515;
background-image: url(../images/titelbild-skydance.jpg);
background-repeat: no-repeat;
background-position: bottom 100%;
background-size: cover;
-webkit-background-size: cover;
-moz-background-size: cover;
background-attachment: fixed;
min-height: 804px;
position: relative;
【问题讨论】:
-
嗨。你能展示一下你到目前为止尝试过的代码吗?
-
已编辑,谢谢!
标签: html css iphone web background-image