In this chapter we will learn about several new background property introduced in css3, like background-size, background-origin and using multiple background images. CSS3 background properties works in all latest browsers including IE9+.
.myBG { background:url(myimage.gif); background-size:50px 50px; /* Width and Height*/ background-repeat:no-repeat; }You can also specify the size in percentage. If you want to stretch the background full width of the div then you can assign the width and height 100%.
.myBG { background:url(myimage.gif); background-size:100% 100%; background-repeat:no-repeat; }
.myBG { background:url(myimage.gif); background-size:50px 50px; /* Width and Height*/ background-origin:content-box; }
.myBG { background:url(myimage1.gif),url(myimage2.gif) ; }