浏览器自带的滚动条样式不够美观,css可以修改网页自带的滚动条样式,代码如下,复制即可使用。
::-webkit-scrollbar { /*滚动条整体样式*/
width: 6px !important; /*高宽分别对应横竖滚动条的尺寸*/
height: 6px !important;
background: #fff !important;
cursor: pointer !important;
}
::-webkit-scrollbar-thumb { /*滚动条里面小方块*/
width: 0;
border-radius: 5px !important;
-webkit-box-shadow: inset 0 0 5px rgba(240, 240, 240, .5) !important;
border: 3px solid #d6d8dc;
cursor: pointer !important;
}
::-webkit-scrollbar-track { /*滚动条里面轨道*/
-webkit-box-shadow: inset 0 0 5px rgba(240, 240, 240, .5) !important;
border-radius: 0 !important;
background: rgba(240, 240, 240, 0.5) !important;
cursor: pointer !important;
}