CSS3 multiple backgrounds


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

img1.png is closest to the viewer and img4.png furthest.
This will create a feeling of stuff moving around when resizing the browserwindow.


Copy this code and paste it in your HTML
  1. body {
  2. background: url(../backgroundForNotSupportedBrowsers.png) repeat-x fixed -80% 0;
  3. background:
  4. url(../img1.png) repeat-x fixed -130% 0,
  5. url(../img2.png) repeat-x fixed 40% 0,
  6. url(../img3.png) repeat-x fixed -80% 0,
  7. url(../img4.png) repeat-x fixed 100% 0;
  8. background-color: #123456;
  9. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.