I have stumbled upon a bit of a problem, the background position fixed/cover is killing me (is not working properly on iOS devices), anyone knows a solution for this (without JS)?
Hey there. What item are you requesting help about? Please contact the author directly so they can assist you.
Please email me with further details of your question, including a link to the item.
It seems your issue is a known, but not widely described issue about background-size cover and background-attachment: fixed on iOS. I’ve also experienced this the first time I created a one page theme, it happens on all mobile Safari/Chrome.
The viewport’s height unlike on desktop browsers is interpreted not as the visible part of your screen but the whole page itself. This makes your background-image stretch, having the same height as the height of your whole page, thus if you have a very long page, the image’s height will be the same as the height of your page.
It’s better to just set the background-attachment to scroll on iOS devices. This needs to be done via JS for detecting iOS, but a non-JS solution would be using media query to just set the background-attachment to scroll below a specific screen width.
Hope that helps.
- Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
- Open a support ticket if you would like specific help with your account, deposits or purchases.
- Item Support by authors is optional and may vary. Please see the Support tab on each item page.
Most of all, enjoy your time here. Thank you for being a valued Envato community member.