Open In App

HTML DOM Style borderBottomRightRadius Property

The DOM borderBottomRightRadius property is used to select any element from the DOM tree and set the style of the radius of the bottom-right corner of its border. 

Syntax :



object.style.borderBottomRightRadius
object.style.borderBottomRightRadius = "length|% [length|%]|
initial|inherit"

Parameter:

Return Value: This sets or returns the radius value of the bottom right corner border.



The below examples illustrate the borderBottomRightRadius property: 

Example 1: This will set the bottom-right-radius value to 25px. 




<!DOCTYPE html>
<html>
<head>
    <title>
        HTML DOM Style borderBottomRightRadius Property
    </title>
    <style>
        div {
            border: 1px solid green;
            width: 300px;
            padding: 40px;
            height: 100px;
            color: green;
        }
    </style>
</head>
<body>
    <div id="mainDiv">
        <h1 onclick="myFunction()">
            GeeksforGeeks.!
        </h1>
    </div>
    <script>
        function myFunction() {
            document.getElementById("mainDiv").style.borderBottomRightRadius =
                "25px";
        }
    </script>
</body>
</html>

Output: 

 

Example 2: This will set the bottom-right-radius value to 25px and then return the value that is set. 




<!DOCTYPE html>
<html>
<head>
    <title>
        HTML DOM Style borderBottomRightRadius Property
    </title>
    <style>
        div {
            border: 1px solid green;
            width: 300px;
            padding: 40px;
            height: 100px;
            color: green;
        }
    </style>
</head>
<body>
    <div id="mainDiv">
        <h1>GeeksforGeeks.!</h1>
    </div>
    <br>
    <p id="val">
        The value that set to the bottom right radius is :
        <span id="value">?</span>
    </p>
    <br>
    <input type="button"
           onclick="myFunction()"
           value="Click Me and check the radius value.!" />
    <script>
        function myFunction() {
            document.getElementById("mainDiv").
            style.borderBottomRightRadius = "25px";
            let x =
                document.getElementById("mainDiv").style.borderBottomRightRadius;
            document.getElementById("value").innerHTML = x;
        }
    </script>
</body>
</html>

Output: 

 

Supported Browser: The browser supported by HTML DOM Style borderBottomRightRadius Property are listed below:


Article Tags :