Style borderTopLeftRadius attribute
- Duba shanin borderTopColor
- Duba shanin borderTopRightRadius
- Duba ɗaya ɗaya Obhaji HTML DOM Style
Definition and usage
borderTopLeftRadius
Sets or returns the shape of the top left corner border.
Tip:This attribute allows you to add rounded border corners to elements!
See also:
CSS reference manual:border-top-left-radius attribute
Example
Add rounded border corners to the top left corner of the div element:
document.getElementById("myDIV").style.borderTopLeftRadius = "25px";
Syntax
Return borderTopLeftRadius attribute:
object.style.borderTopLeftRadius
Set borderTopLeftRadius attribute:
object.style.borderTopLeftRadius = "length|% [length|%]|initial|inherit"
Note:The length value and percentage value of the border-top-left-radius attribute 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.
Attribute value
Value | Description |
---|---|
length | Defines the shape of the top left corner. |
% | Defines the shape of the bottom left 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, represents the element's border-top-left-radius attribute. |
CSS version: | CSS3 |
browser supports
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Gudanarwa | 9.0 | Gudanarwa | Gudanarwa | Gudanarwa |
- Duba shanin borderTopColor
- Duba shanin borderTopRightRadius
- Duba ɗaya ɗaya Obhaji HTML DOM Style