css code to set div scroll bar color

PHP中文网
Release: 2017-03-16 16:43:00
Original
2015 people have browsed it

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>
Copy after login

css code to set div scroll bar color

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
  }
}
Copy after login
<p onmousemove="lhs(this.className);"></p>
Copy after login

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

How to distinguish different IE versions in style sheets ? How to make the scroll bar color compatible with IE8 and IE10?

Solution to the problem that the scroll bar color cannot be set in IE6

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template