Style borderTopRightRadius property
- Forrige side borderTopLeftRadius
- Næste side borderTopStyle
- Gå tilbage til forrige niveau 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, not 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 | Define the shape of the top right corner. |
% | Define the shape of the top right corner with percentage values. |
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: | string, indicating the element's border-top-right-radius property. |
CSS version: | CSS3 |
browser support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Støtte | 9.0 | Støtte | Støtte | Støtte |
- Forrige side borderTopLeftRadius
- Næste side borderTopStyle
- Gå tilbage til forrige niveau HTML DOM Style Object