Javascript DOM CSS Style borderBottomLeftRadius Property

Introduction

Add a rounded border to the bottom-left corner of a div element:

document.getElementById("myDIV").style.borderBottomLeftRadius = "25px";

Click the button to change the border-bottom-left-radius property of the DIV element:

View in separate window

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

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

<div id="myDIV">
  <h1>Hello</h1>
</div>

<script>
function myFunction() {
  document.getElementById("myDIV").style.borderBottomLeftRadius = "25px";
}
</script>

</body>
</html>

The borderBottomLeftRadius property sets or gets the shape of the border of the bottom-left corner.

This property allow you to add rounded borders to elements!

Property Values

Value Description
length Defines the shape of the bottom-left corner. Default value is 0
% Defines the shape of the bottom-left corner in %
initial Sets this property to its default value.
inherit Inherits this property from its parent element.

The borderBottomLeftRadius property return a String representing the border-bottom-left-radius property of an element.




PreviousNext

Related