CSS3 border-top-right-radiusProperty
Example
Add a rounded border to the top-right corner of a div element:
{
border:2px solid;
border-top-right-radius:2em;
}
Try it Yourself »
Browser Support
The numbers in the table indicate the first browser version number that supports the property.
The number preceding -webkit-, -ms-, or -moz- is the first browser version number that supports the prefixed property.
| Property | |||||
|---|---|---|---|---|---|
| border-radius | 9.0 | 5.0 4.0 -webkit- | 4.0 3.0 -moz- | 5.0 3.1 -webkit- | 10.5 |
Property definition and usage notes
The border-top-right-radius property defines the shape of the top-right corner border.
Tip:This property allows you to add rounded borders to elements!
| Default Value: | 0 |
|---|---|
| Inherited: | no |
| version: | CSS3 |
| JavaScript Syntax: | object object.style.borderTopRightRadius="5px" |
Syntax
Note:The two length or percentage values of the border-top-right--radius property define the shape of the corner at the outer edge of the border as a quarter ellipse. The first value is the horizontal radius, and the second is the vertical radius. If the second value is omitted, it is copied from the first. If either length is zero, the corner is square, not rounded. Percentages for the horizontal radius refer to the width of the border box, while percentages for the vertical radius refer to the height of the border box.
| Value | Description |
|---|---|
| length | Defines the shape of the top-right corner. |
| % | Defines the shape of the top-right corner using %. |
Related Articles
CSS3 Tutorial:CSS3 Borders
other extensions