/* 谷歌浏览器 */
/* 滚动条整条部分 */
::-webkit-scrollbar{
width: 6px;
background-color: #fff;
}
/* 滑动条 能向上向下移动 */
::-webkit-scrollbar-thumb {
border-radius: 4px;
background-color: rgba(144, 147, 153, .3);
}
::-webkit-scrollbar-track {
border-radius: 4px;
}
浏览器自带的滚动条比较丑,通过几行代码就可以定制我们自己的滚动条啦
获取使用下面的样式
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-track {
width: 6px;
background: rgba(#101F1C, 0.1);
-webkit-border-radius: 2em;
-moz-border-radius: 2em;
border-radius: 2em;
}
::-webkit-scrollbar-thumb {
background-color: rgba(#101F1C, 0.5);
background-clip: padding-box;
min-height: 28px;
-webkit-border-radius: 2em;
-moz-border-radius: 2em;
border-radius: 2em;
}
::-webkit-scrollbar-thumb:hover {
background-color: rgba(#101F1C, 1);
}
网友评论