修改默认的滚动条样式

为了方便自己查看,复制别人的。保存个副本

.list::-webkit-scrollbar {

width: 8px;

height: 8px;

}

/*正常情况下滑块的样式*/

.list::-webkit-scrollbar-thumb {

background-color: rgba(0,0,0,.3);

border-radius: 10px;

-webkit-box-shadow: inset 1px 1px 0 rgba(0,0,0,.1);

}

/*鼠标悬浮在该类指向的控件上时滑块的样式*/

.list:hover::-webkit-scrollbar-thumb {

background-color: rgba(0,0,0,.2);

border-radius: 10px;

-webkit-box-shadow: inset 1px 1px 0 rgba(0,0,0,.1);

}

/*鼠标悬浮在滑块上时滑块的样式*/

.list::-webkit-scrollbar-thumb:hover {

background-color: rgba(0,0,0,.4);

-webkit-box-shadow: inset 1px 1px 0 rgba(0,0,0,.1);

}

/*正常时候的主干部分*/

.list::-webkit-scrollbar-track {

border-radius: 10px;

-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0);

background-color: white;

}

/*鼠标悬浮在滚动条上的主干部分*/

.list::-webkit-scrollbar-track:hover {

-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.4);

background-color: rgba(0,0,0,.01);

}

猜你喜欢

转载自blog.csdn.net/ToBeBestPlayer/article/details/82256556