0
我试图解决我的网站的背景,我有地方有我的网站上一个div“bgDiv”的位置固定。它在桌面上运行良好。但在iPad上固定的位置不工作,它与我的整个网站滚动。和背景图像重复。有什么办法可以避免滚动bgDiv。位置固定不工作在iPad
.bgDiv{
background: url("test.jpg") repeat scroll 0 0 transparent;
background-size: 100% 100%;
bottom: 0;
left: 0;
position: fixed;
right: 0;
top: 0;
z-index: -2;
height: inherit;
}
<body>
<div class="bgDiv"></div>
<div class="wrapper">
content
</div>
</body>
可能重复:http://stackoverflow.com/questions/4408363/fixed-position-not-working-on-ipa d?RQ = 1 – FoolishSeth 2013-03-26 06:51:50