Home>Article>Web Front-end> How to set scroll bar color in css

How to set scroll bar color in css

醉折花枝作酒筹
醉折花枝作酒筹 Original
2021-04-13 18:18:21 8588browse

In CSS, you can set the scroll bar color through the scrollbar-face-color attribute, the syntax "scrollbar-face-color: color value"; the scrollbar-face-color attribute can set or retrieve the scroll bar 3D surface ( ThreedFace) color.

How to set scroll bar color in css

The operating environment of this tutorial: Windows7 system, CSS3&&HTML5 version, Dell G3 computer.

Set scroll bar color:

.div-box { width: 600px; height: 200px; overflow-y: auto; border: 1px solid #DCDFE6; margin: 20px; scrollbar-face-color: #333; /*滚动条颜色*/ scrollbar-shadow-color: #999;/*滚动条阴影颜色*/ }

Recommended learning:css video tutorial

The above is the detailed content of How to set scroll bar color in css. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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
Previous article:How to fix elements in css Next article:How to fix elements in css