Home >Web Front-end >CSS Tutorial >How to set scroll bar color in css
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.
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!