我完全难住了。这个问题浪费了我太多的时间。仅在iOS设备上破解的两个背景图像之一
我有两个背景视差滚动 - 工作'几乎'完美。增加对手机网站的响应速度。如果我使用chromes移动模拟器,则可以完美地适用于所有设备。如果我在Android手机上使用它,完美...但是在iOS上,第一个背景图像适用,但第二个是不可见的。你看到的只是内容和白色背景。这是毫无意义的,考虑到它们具有相同的设置 - 我尝试重命名图像,更改图像文件类型,使用与background-1中相同的图像,但它们都不起作用。我尝试删除几乎所有的代码库,尝试从底部到顶部进行调试 - 没有任何实现。唯一值得注意的是,如果我完全删除了.background-1,那么.background-2的背景图像的一部分显示 - 尽管它的高度是100vh。
总结:在模拟器上完美工作,android手机完美 - iphone两个几乎相同的div之一工作。
<div class = "background-1"> </div>
<div class = "information">This div contains some information.....</div>
<div class = "background-2"></div>
.background-1, {
background-image: url("image1.jpg");
background-size:cover;
background-repeat:no-repeat;
background-attachment: fixed;
background-blend-mode: lighten;
background-color: rgba(255,255,255,0.2);
height:100vh;
width:100%;
position: relative;
}
.background-2{
background-image: url("image2.jpg");
background-size:cover;
background-repeat:no-repeat;
background-attachment: fixed;
background-blend-mode: lighten;
background-color: rgba(255,255,255,0.2);
height:100vh;
width:100%;
position: relative;
}
'background-position:top'可能。这让我想起了一些IE6的bug和BG附件 –
不幸的是,没有做任何事情,谢谢你的回应,虽然:) @GCyrillus – axiwanno
太糟糕了,它似乎太容易了另一方面:( –