Full Background Image in CSS


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

Full Background Image in CSS


Copy this code and paste it in your HTML
  1. body {
  2. background-image: url('sample.jpg');
  3. background-size: cover;
  4. background-repeat: no-repeat;
  5. background-position: top center;
  6. background-attachment: fixed;
  7. filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='sample.jpg', sizingMethod='scale');
  8. -ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='sample.jpg', sizingMethod='scale')";
  9. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.