Perfect full screen background image


/ Published in: CSS
Save to your folder(s)



Copy this code and paste it in your HTML
  1. html {
  2. background: url(images/background01.jpg) no-repeat center center fixed;
  3. -webkit-background-size: cover;
  4. -moz-background-size: cover;
  5. -o-background-size: cover;
  6. background-size: cover;
  7. /* IE compatability */
  8. filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='.myBackground.jpg', sizingMethod='scale');
  9. -ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='myBackground.jpg', sizingMethod='scale')";
  10. }

URL: http://css-tricks.com/3458-perfect-full-page-background-image/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.