Javascript examples for CSS Style Property:borderRightColor
The borderRightColor property sets or gets the right border's color.
Value | Description |
---|---|
color | Set the color of the right border. |
transparent | The color of the right border is transparent |
initial | Sets this property to its default value. |
inherit | Inherits this property from its parent element. |
Item | Value |
---|---|
Default Value: | black |
Return Value: | A String, representing the color of an element's right border |
CSS Version | CSS1 |
Get the color of the right border of a <div> element
<!DOCTYPE html> <html> <body> <div id="myDiv" style="border-right:thick solid green">This is a div.</div> <br> <button type="button" onclick="myFunction()">Return right border color</button> <script> function myFunction() {//from w ww.j av a2s. c om console.log(document.getElementById("myDiv").style.borderRightColor); } </script> </body> </html>