Background image auto resize CSS



Perfect Full Page Background-image



Fills entire page with image, no white space



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;


}





Works in:





  • Safari 3+

  • IE 9+

  • Opera 10+ (Opera 9.5 supported background-size but not the keywords)

  • Firefox 3.6+ (Firefox 4 supports non-vendor prefixed version)

  • Chrome Whatever+







Comments

Popular posts from this blog

Why Mark Zuckerberg’s Choose 4

Error message when I run sudo: unable to resolve host (none)

Convert MBR to GPT