Answer the question
In order to leave comments, you need to log in
background-attachment: fixed doesn't work on mob. device, what's the problem?
The question is in the title. I checked it on the iPad and on some poop for 1k rubles (android, ps I have nothing against android) On the iPade, the background image increases (approaches) 2 times
Here is a piece of code:
#main {
background: url(../images/tym2.jpg);
background-position: top center;
background-attachment: fixed;
height: 110vh;
position: relative;
-webkit-background-size: cover;
background-size: cover;
}
Answer the question
In order to leave comments, you need to log in
попробуй добавить overflow-y: scroll; вместо него
задать #main
и родителю height: 100%;
родителю overflow-y: hidden;
if (iosVersion >= 7) {
$(document).scroll(function() {
$('#main').css('background-position', '0px ' + $(document).scrollTop() + 'px');
});
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question