HTML DOM scrollbarArrowColor 属性
JavaScript基础 2022-06-08 14:50:2316小码哥的IT人生shichen
HTML DOM scrollbarArrowColor 属性
定义和用法
scrollbarArrowColor 属性设置滚动条中箭头的颜色。
语法:
Object.style.scrollbarArrowColor=color
可能的值
值 | 描述 |
---|---|
color | 颜色值可以是颜色名 (red),rgb 值 (rgb(255,0,0)),或十六进制 (#ff0000)。 |
实例
本例设置滚动条中箭头的颜色:
<html> <head> <script type="text/javascript"> function setScrollbarArrowColor() { document.body.style.scrollbarArrowColor="green";
} </script> </head> <body> <input type="button" onclick="setScrollbarArrowColor()" value="Set ScrollbarArrowColor" /> </body> </html>
TIY
完整实例【scrollbarArrowColor】:
<html> <head> <script type="text/javascript"> function setScrollbarArrowColor() { document.body.style.scrollbarArrowColor="green"; } </script> </head> <body> <input type="button" onclick="setScrollbarArrowColor()" value="Set ScrollbarArrowColor" /> <p>An example paragraph</p> <p>An example paragraph</p> <p>An example paragraph</p> <p>An example paragraph</p> <p>An example paragraph</p> <p>An example paragraph</p> <p>An example paragraph</p> <p>An example paragraph</p> <p>An example paragraph</p> <p>An example paragraph</p> <p>An example paragraph</p> </body> </html>
可以使用本站在线JavaScript测试工具测试上述代码运行效果:http://www.phpcodeweb.com/runjs.html