Good afternoon guys.
I developed a site for my girlfriend, and when I open the same on an iphone, the paralax image does not appear, it gets blurred.
Android, notebook and desktop devices are running normal.
www.anagasparini.com.br
Good afternoon guys.
I developed a site for my girlfriend, and when I open the same on an iphone, the paralax image does not appear, it gets blurred.
Android, notebook and desktop devices are running normal.
www.anagasparini.com.br
The problem is because background-attachment: fixed;
is not supported in Safari (I've already addressed the subject in this answer ) . This is why the image is full-size, ignoring background-size: cover;
.
What you can do is add a script to leave the background fixed. The result in iOS Safari may not be 100%, but it resolves the image issue.
The script is this:
document.addEventListener("scroll", function(){
document.querySelector("#paralax").style.backgroundPosition = 'center '+window.pageYOffset+'px';
});
And in CSS, delete background-attachment: fixed;
.
See what's on the iPhone 3GS: