CSS3 multiple backgrounds


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

CSS3 multiple backgrounds with fallback color.
For compatibility info see http://caniuse.com/#search=multiple%20background


Copy this code and paste it in your HTML
  1. .mydiv {
  2. background: url(bkg1.png) repeat top left,
  3. url(bkg2.png) repeat top left,
  4. /* ... */
  5. ;
  6. /* Fallback for browsers who don't support multiple backgrounds;
  7.   the background color won't be displayed unless it's declared separately. */
  8. background-color: #000;
  9. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.