March 28, 2013

Mutiple background images in css3

We can use multiple background images in css3.

This is how it will look.

#example {
width: 500px;
height: 250px;
background-image: url(decoration.png), url(ribbon.png), url(old_paper.jpg);
background-repeat: no-repeat;
background-position: left top, right bottom, left top;
}
You can even write like this.
#example {
width: 500px;
height: 250px;
background: url(decoration.png) left top no-repeat, url(ribbon.png) right bottom no-repeat, url(old_paper.jpg) left top no-repeat;
}

No comments:

Post a Comment

Popular Posts

Views