Home >Web Front-end >HTML Tutorial >css code to set div scroll bar color
In this article, we will introduce to you the css code for setting the color of p scroll bar.
<p style="width:260px;height:120px; overflow-y:scroll; scrollbar-base-color:#ff6600; border:1px solid;"> 这里是你要显示的内容 </p>
SCROLLBAR-FACE-COLOR (the color of the raised part of the three-dimensional scroll bar)
SCROLLBAR-HIGHLIGHT-COLOR (the color of the blank part of the scroll bar) Color) slide
SCROLLBAR-ARROW-COLOR (the color of the triangular arrows on the up and down buttons)
SCROLLBAR-SHADOW-COLOR (the color of the three-dimensional scroll bar shadow)
SCROLLBAR -BASE-COLOR (the basic color of the scroll bar)
SCROLLBAR-DARK-SHADOW-COLOR (the color of the strong shadow of the three-dimensional scroll bar)
According to the onmousemove event, you can achieve untouchable p
function lhs(obj){ if(obj=="dfdf"){ document.getElementById("asf") = dfdf2 }else{ document.getElementById("asf") = dfdf } }
<p onmousemove="lhs(this.className);"></p>
The above are the details of the css code for setting the p scroll bar color. For more information, please pay attention to other related articles on the PHP Chinese website!
Related articles:
DIV implements automatic scrolling function and scroll bar color modification
Solution to the problem that the scroll bar color cannot be set in IE6