Ios 背景位置固定图像问题
我想在两个不同的部分两个背景图像。这些代码适用于单一固定背景。我一应用第二个背景,它就会覆盖第一个背景。 我希望两个背景图像都固定,并且应该在iPad上工作。单个固定背景在iPad上工作 这是我的CSSIos 背景位置固定图像问题,ios,html,css,Ios,Html,Css,我想在两个不同的部分两个背景图像。这些代码适用于单一固定背景。我一应用第二个背景,它就会覆盖第一个背景。 我希望两个背景图像都固定,并且应该在iPad上工作。单个固定背景在iPad上工作 这是我的CSS .booking-menu-wrapper::before{ content: ""; display: block; position: fixed; left: 0; top: 0; width: 100%; hei
.booking-menu-wrapper::before{
content: "";
display: block;
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: -10;
background: url("http://farm3.staticflickr.com/2533/4062253262_90a3635234_o.jpg") no-repeat center top;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.booking2::before{
content: "";
display: block;
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: -10;
background: url("http://uploads.webflow.com/556801b89cccf1594633da22/556807c647dc18034e5e296c_Nature271.jpg") no-repeat center top;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
label{
width:100%;
background:#fff;
display:block;
height:1000px;
margin-top:200px;
}
注意固定背景不在正文标签上,仍然覆盖整个页面这是你的意思吗?无法在图像上应用“位置固定”,因为它们将忽略包含的父对象。我将“固定”作为图像属性的一部分应用,因此它将固定到parent@toast谢谢你的时间,是的,这是我想要的输出,但fixed bg属性在iPadlook上不起作用,就像他们在这里介绍的那样>@toast我看到了,但他们使用的是第三方JS,我希望这些使用CSS可能的副本