How to set the shape of the border of the bottom-right corner in JavaScript DOM?

HTMLJavascriptProgramming Scripts

To set the shape of the border of the bottom-right corner in JavaScript, use the borderBottomRightRadius property. It allows you to set a rounded border.

Example

You can try to run the following code to learn how to set the shape of the bottom-right corner −

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <style>
         #box {
            border: 2px dashed blue;
            width: 120px;
            height: 120px;
         }
      </style>
   </head>
   <body>
      <button onclick="display()">Set bottom-right border corner</button>
      <div id="box">
         <p>Demo Text</p>
         <p>Demo Text</p>
      </div>
      <script>
         function display() {
            document.getElementById("box").style.borderBottomRightRadius = "30px";
         }
      </script>
   </body>
</html>
raja
Published on 27-Feb-2018 10:10:08
Advertisements