Created
April 16, 2013 13:37
-
-
Save SimonWpt/5395951 to your computer and use it in GitHub Desktop.
Responsive Backgroundimage
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
img.bg | |
/* Set rules to fill background | |
min-height: 100% | |
min-width: 1024px | |
/* Set up proportionate scaling | |
width: 100% | |
height: auto | |
/* Set up positioning | |
position: fixed | |
top: 0 | |
left: 0 | |
@media screen and (max-width: 1024px) | |
img.bg | |
left: 50% | |
margin-left: -512px |
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
%body | |
%img.bg(src="images/bg.jpg") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment