Javascript examples for CSS Style Property:borderTopRightRadius
The borderTopRightRadius property sets the radii of the border top-right corner.
Value | Description |
---|---|
length | Set radii using length unit |
% | Set radii using the percentage |
initial | Sets this property to its default value. |
inherit | Inherits this property from its parent element. |
Item | Value |
---|---|
Default Value: | 0 |
Return Value: | A String, representing the border-top-right-radius property of an element |
CSS Version | CSS3 |
Add a rounded border to the top-right corner of a div element:
<!DOCTYPE html> <html> <head> <style> #myDIV {/*from w ww .ja va2s . 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.borderTopRightRadius = "25px"; } </script> </body> </html>