Add rounded borders to a div element:
![]()
The border-radius property is supported in IE9+, Firefox 4+, Chrome, Safari 5+, and Opera.
The border-radius property is a shorthand property for setting the four border-*-radius properties.
Tip: This property allows you to add rounded borders to elements!
| Default value: | 0 |
|---|---|
| Inherited: | no |
| Version: | CSS3 |
| JavaScript syntax: | object.style.borderRadius="5px" |
Note: The four values for each radii are given in the order top-left, top-right, bottom-right, bottom-left. If bottom-left is omitted it is the same as top-right. If bottom-right is omitted it is the same as top-left. If top-right is omitted it is the same as top-left.
| Value | Description | Play it |
|---|---|---|
| length | Defines the shape of the corners | Play it » |
| % | Defines the shape of the corners in % | Play it » |
CSS3 tutorial: CSS3 Borders
Your message has been sent to W3Schools.