-
-
Save jamesmehorter/3504059943f06653de94 to your computer and use it in GitHub Desktop.
Full screen background image(s) -- could be a slideshow
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
//The slideshow container is positioned below all other content to display like a background image | |
section.backgrounds { | |
position: absolute ; | |
z-index: 0 ; | |
top: 0 ; left: 0 ; | |
width: 100% ; height: 100% ; | |
overflow: hidden !important ; //This keeps the 200% dimensions used below in check and not showing scroll bars | |
figure.background { | |
//The following trick is used to display the slideshow slides at the full-width of the screen | |
//This effect looks just like using background-size: cover ; but is supported by older browsers | |
position: absolute !important ; | |
z-index: 0 ; | |
top: -50% !important ; left: -50% !important ; | |
width: 200% ; height: 200% ; | |
img { | |
position: absolute ; | |
z-index: 0 ; | |
top: 0 ; bottom: 0 ; left: 0 ; right: 0 ; | |
margin: auto ; | |
min-width: 50% ; min-height: 50% ; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment