/*定义轨道的宽高{height定义的是横向轨道的高,width定义的是垂直轨道的宽}*/
::-webkit-scrollbar {
width: 5px;
background-color: #F5F5F5;
}
/*定义的轨道的样式*/
::-webkit-scrollbar-track {
border-radius: 2px;
background-color: #f5f5f5;
}
/*定义的滑块的样式*/
::-webkit-scrollbar-thumb {
border-radius: 3px;
box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
background-color: #ccc;
}
效果图如下: