Style borderTopLeftRadius property
- Pagina precedente borderTopColor
- Pagina successiva borderTopRightRadius
- Torna alla pagina precedente Oggetto Style HTML DOM
Definition and usage
borderTopLeftRadius
Sets or returns the shape of the top left border corner.
Tip:This property allows you to add rounded border corners to the element!
See also:
CSS Reference Manual:border-top-left-radius property
Example
Add rounded border corners to the top left corner of the div element:
document.getElementById("myDIV").style.borderTopLeftRadius = "25px";
Syntax
Return borderTopLeftRadius property:
object.style.borderTopLeftRadius
Set borderTopLeftRadius property:
object.style.borderTopLeftRadius = "length|% [length|%]|initial|inherit"
Note:The length value and percentage value of the border-top-left-radius property define the radius of a quarter ellipse (defining the shape of the corner edges of the external border). 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 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: | A string that represents the element's border-top-left-radius property. |
CSS version: | CSS3 |
Browser support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Supporto | 9.0 | Supporto | Supporto | Supporto |
- Pagina precedente borderTopColor
- Pagina successiva borderTopRightRadius
- Torna alla pagina precedente Oggetto Style HTML DOM