.box{
::-webkit-scrollbar{
width: 8px;
height: 16px;
// background-color: #f5f5f5 !important;
}
/*定义滑块,内阴影及圆角*/
::-webkit-scrollbar-thumb{
/*width: 10px;*/
height: 20px !important;;
border-radius: 20px !important;;
-webkit-box-shadow: inset 0 0 6px #a1a1a2!important;
background-color: #a1a1a2 !important;
}
/*鼠标悬停时滑块效果*/
& :hover::-webkit-scrollbar-thumb{
/*width: 10px;*/
height: 20px !important;;
border-radius: 20px !important;;
-webkit-box-shadow: inset 0 0 6px rgb(90, 90, 90)!important;
background-color: rgb(90, 90, 90) !important;
}
// 轨道样式
::-webkit-scrollbar-track {
background:#f1f1f1;
}
}
以下为效果图: