版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/LzzMandy/article/details/84790573
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
.scroll {
-webkit-text-size-adjust: none;
font-family: "微软雅黑";
margin: 0;
padding: 0;
color: #2a2a2a;
scrollbar-arrow-color: #bec5ca; /**//*三角箭头的颜色*/
scrollbar-face-color: #bec5ca; /**//*立体滚动条的颜色*/
scrollbar-3dlight-color: #bec5ca; /**//*立体滚动条亮边的颜色*/
scrollbar-highlight-color: #bec5ca; /**//*滚动条空白部分的颜色*/
scrollbar-shadow-color: #bec5ca; /**//*立体滚动条阴影的颜色*/
scrollbar-darkshadow-color: #bec5ca; /**//*立体滚动条强阴影的颜色*/
scrollbar-track-color: #e5e7eb; /**//*立体滚动条背景颜色*/
scrollbar-base-color:#e5e7eb; /**//*滚动条的基本颜色*/
}
.scroll::-webkit-scrollbar {width: 10px;height:10px;}/*滚动条整体宽高*/
.scroll::-webkit-scrollbar-track{background-color: #ffffff;margin:0;border-radius: 5px;}/*滚动条轨道*/
.scroll::-webkit-scrollbar-thumb{background: #51B4F4;min-height: 50px;min-width: 50px;border-radius: 5px;}/*滚动条颜色设置*/
.scroll::-webkit-scrollbar-thumb:vertical:hover{background: #5175F6}/*垂直滚动条颜色设置*/
.scroll::-webkit-scrollbar-thumb:horizontal:hover{background: #5175F6}/*水平滚动条颜色设置*/
</style>
</head>
<body>
<div class="scroll" style="width: 300px;height: 200px;overflow: auto;margin: 100px auto;background: pink;border: 1px solid pink;">
滚动条的样式设置,请参考。<br>
滚动条的样式设置,请参考。<br>
滚动条的样式设置,请参考。<br>
滚动条的样式设置,请参考。<br>
滚动条的样式设置,请参考。<br>
滚动条的样式设置,请参考。<br>
滚动条的样式设置,请参考。<br>
滚动条的样式设置,请参考。<br>
滚动条的样式设置,请参考。<br>
滚动条的样式设置,请参考。<br>
滚动条的样式设置,请参考。<br>
滚动条的样式设置,请参考。<br>
滚动条的样式设置,请参考。<br>
滚动条的样式设置,请参考。<br>
滚动条的样式设置,请参考。<br>
滚动条的样式设置,请参考。<br>
</div>
</body>
</html>