When CSS3 is fully supported across browsers rounded corners will be as simple as:
which will set a 5px radius on all 4 corners. For now we need some browser specific CSS combined with a little JavaScript to make this work in all browsers. In Safari, Chrome, and other webkit browsers we use -webkit-border-radius and in Firefox and other Mozilla based browsers we use -moz-border-radius.
Webkit and Mozilla use different syntax when specifying one corner.
For non Webkit and Mozilla browsers a little jQuery pluginwill mimic the border-radius property.
The jQuery corner plugin allows for more than setting the radius of the corner. You can also set the corner to show as a number of other patterns.
1 .element 2 { 3 border-radius: 5px; 4 } 1 .element { 2 border-radius: 5px 3 -webkit-border-radius: 5px 4 -moz-border-radius: 5px 5 } 1 .element { 2 border-top-left-radius: 5px 3 -webkit-border-top-left-radius: 5px 4 -moz-border-radius-top-left 5 } 1 $(".element").corner("5px");
You need to login to post a comment.
