Created
April 13, 2013 17:01
-
-
Save seoagentur-hamburg/5379200 to your computer and use it in GitHub Desktop.
The CSS for fullpage background images
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.hintergrundbild { | |
min-height: 100%; /* Diese zwei Zeilen setzen die Regeln um den Hintergrund zu füllen */ | |
min-width: 1024px; | |
width: 100%; /* Die Regeln, welche für die Skalierung sorgen */ | |
height: auto; | |
position: fixed; /* Die Positionierung */ | |
top: 0; | |
left: 0; | |
} | |
@media screen and (max-width: 1024px) { | |
img.hintergrundbild { | |
left: 50%; /* Ohne diese Angaben funktioniert es nicht */ | |
margin-left: -512px; | |
} | |
} | |
div#inhalt { | |
position: relative; /* Diese Angabe ist extrem wichtig, da ansonsten der Inhalt nicht angezeigt wird! */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment