CSS property: “background-attachment: fixed” on iOS and Safari
How to solve the problem with fixing the background on the site for iOS devices and the Safari browser? In Dolphin, by the way, everything works fine.
-
-
·
LeonidS
- ·
Hello @Ivan Mishchenko !
Could you plz provide us with more details about it, it would be nice if with some screenshots.
-
·
LeonidS
-
- · Ivan Mishchenko
- ·
Everything works fine on Windows and Android. iOS, as I understand it, does not support the CSS property (background-attachment: fixed). So the question arose of what method on iOS devices can be done so that the background on the site does not scroll along with the content.
-
- · Ivan Mishchenko
- ·
Works on Dolphin even on iOS.
-
-
·
Alex T⚜️
- ·
You can try something like this to make 'fixed' background to work on iOS in UNA:
.bx-main { background-color: transparent; } html::before { content: ""; display: block; position: fixed; left: 0; top: 0; width: 100%; height: 100%; z-index: -10; background: url(https://us-east-1.linodeobjects.com/una/bx_posts_photos_resized/g/gh/ghm/ghmnxxsz2c7d6tkt3rtfchrreye6finw.png) no-repeat center center; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; }
-
·
Alex T⚜️
-
Thank you!