borderTopLeftRadius Property - Javascript CSS Style Property

Javascript examples for CSS Style Property:borderTopLeftRadius


The borderTopLeftRadius property sets or gets the radii for border top-left corner.

Property Values

Value Description
length radii in length unit
% radii in percentage
initial Sets this property to its default value.
inherit Inherits this property from its parent element.

Technical Details

Item Value
Default Value: 0
Return Value: A String, representing the border-top-left-radius property of an element
CSS VersionCSS3

Set a rounded border to the top-left corner of a div element:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
#myDIV {/* w  w w. j  av  a 2 s . c om*/
    border: 1px solid black;
    width: 300px;
    height: 300px;

<button onclick="myFunction()">Test</button>

<div id="myDIV">

function myFunction() {
    document.getElementById("myDIV").style.borderTopLeftRadius = "25px";


Related Tutorials