Site logo

Archived topic

fixed background image in mobile is not shown

5 replies · Started by Heinrich on June 2, 2021

Viewing posts 1–6 of 6

hi team,

in a container, when i change a mobile background image to "fixed" it is not longer visible in mobile. ich change back to "scroll" it is visible again.
how to solve this?

Hi there,

a lot of mobile devices will NOT support fixed background images as it requires a lot of processing power and therefore consumes a lot of battery. So the device disables the fixed background... and on iOS there is a many year old Bug that causes the image to be rescaled to a huge size.

The fix is to disable the fixed background images on touch devices using some CSS:

@media (pointer: coarse) {
    .gb-container {
        background-attachment: inital !important;
    }
}

hi david, good to know. as a solution, can i handle this with advanced background in gpp? fixed for desktop and scroll for mobile? so i don`t need your css-code?

With GenerateBlocks Pro you can use the Advanced Background option and set a different background-attachment for Mobile.

tks

You're welcome

This archived topic is closed to new replies.