Skip to content

Instantly share code, notes, and snippets.

@trumball
Created May 24, 2013 13:16
Show Gist options
  • Save trumball/5643431 to your computer and use it in GitHub Desktop.
Save trumball/5643431 to your computer and use it in GitHub Desktop.
Fullscreen Backgrounds With CSS3 I should note that this code will not work properly in older browsers which do not support CSS3 syntax. However if you’re looking for a quick solution and don’t care about legacy support, this is the best chunk of code you’ll find! Great for adding big photographs into the background of your website while keeping…
html {
background: url('images/bg.jpg') no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment