浏览器当前窗口滚动条中同时显示多种颜色

时间:2018-08-14 17:18:05

标签: javascript jquery google-chrome-extension jquery-plugins

我正在开发chrome扩展程序,我想在滚动条中突出显示内容的位置,就像 enter image description here

就像图像一样,我要突出显示滚动条的一部分。如何获取滚动条并更改颜色(滚动条中为两种颜色)##标题##

1 个答案:

答案 0 :(得分:0)

::-webkit-scrollbar :: the scrollbar
::-webkit-scrollbar-button :: the buttons on the scrollbar (arrows pointing upwards and downwards).
::-webkit-scrollbar-thumb :: the draggable scrolling handle.
::-webkit-scrollbar-track :: the track (progress bar) of the scrollbar.
::-webkit-scrollbar-track-piece :: the track (progress bar) NOT covered by the handle.
::-webkit-scrollbar-corner :: the bottom corner of the scrollbar, where both horizontal and veritcal scrollbars meet.
::-webkit-resizer :: the draggable resizing handle that appears at the bottom corner of some elements.

只要它是使用webkit的浏览器,就可以使用CSS对滚动条做很多很酷的事情。

查看这些页面以获取更多信息:https://www.w3schools.com/howto/howto_css_custom_scrollbar.asp https://developer.mozilla.org/en-US/docs/Web/CSS/::-webkit-scrollbar