Style borderTopRightRadius Property
- Previous Page borderTopLeftRadius
- Next Page borderTopStyle
- Go to the Previous Level HTML DOM Style Object
Definition and Usage
borderTopRightRadius
This property defines the shape of the top-right corner border.
Tip:This property allows you to add rounded border corners to elements!
See Also:
CSS Reference Manual:border-top-right-radius Property
Example
Add rounded border corners to the top-right corner of the div element:
document.getElementById("myDIV").style.borderTopRightRadius = "25px";
Syntax
Return borderTopRightRadius Property:
object.style.borderTopRightRadius
Set borderTopRightRadius Property:
object.style.borderTopRightRadius = "length|% [length|%]|initial|inherit"
Note:The length value and percentage value of the border-top-right-radius property define the radius of a quarter ellipse (defining the shape of the corner of the external border edge). The first value is the horizontal radius, and the second value is the vertical radius. If the second value is omitted, the first value is copied. If the length is zero, the corner is square rather than round. The percentage value of the horizontal radius refers to the width of the border box, and the percentage value of the vertical radius refers to the height of the border box.
Property Value
Value | Description |
---|---|
length | Defines the shape of the top-right corner. |
% | Defines the shape of the top-right corner in percentage. |
initial | Sets this property to its default value. See initial. |
inherit | Inherits this property from its parent element. See inherit. |
Technical Details
Default Value: | 0 |
---|---|
Return Value: | A string that represents the element's border-top-right-radius Property. |
CSS Version: | CSS3 |
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | 9.0 | Support | Support | Support |
- Previous Page borderTopLeftRadius
- Next Page borderTopStyle
- Go to the Previous Level HTML DOM Style Object