Last active
September 20, 2022 20:34
-
-
Save alexmustin/5c861314ecaa8eb4b007f29a5ee350da to your computer and use it in GitHub Desktop.
CSS background cover mobile iOS fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This applies to Genesis Blocks that have | |
* a 'fixed' background image applied. | |
*/ | |
.gb-has-parallax { | |
/** | |
* This is the fix for mobile (iOS). | |
* It displays as a normal background image which fills | |
* the container and scrolls with the content. | |
*/ | |
background-attachment: scroll; | |
/** | |
* Keep the normal fixed behavior for larger screens. | |
*/ | |
@include media-breakpoint-up(md) { | |
background-attachment: fixed; | |
} | |
} | |
/* Also ensure the .site-inner element does not have any transform applied. */ | |
.site-inner { | |
transform: none; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment