Monday, 12 September 2011

CSS3 is introducing Background-size

There is one new property introduced by the CSS3 Background-size. The property adds new functionality to CSS allowing designers to specify the size of background images using either lengths, percentages, or by using one of two keywords; contain or bycover.Most of the popular browsers are now supporting background-size, including Firefox, Safari, Chrome, Internet Explorer and Opera, without the need for vendor prefixes. of code:

       #exp1 {
        height: 150px;
        width: 150px;
        border:  1px solid #cccccc;
        /* For Mozilla: */
        -moz-border-radius: 10px;
        /* For WebKit: */
        -webkit-border-radius: 10px;

No comments:

Post a Comment