预览:
注意:taphelp-ul为你需要滚动条的盒子类名
.taphelp-ul::-webkit-scrollbar
{
border-radius: 10px;
width: 10px;
height: 16px;
background-color: #F5F5F5;
}
.taphelp-ul::-webkit-scrollbar-track
{
/* -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); */
border-radius: 10px;
background-color: #ededed;
}
.taphelp-ul::-webkit-scrollbar-thumb
{
border-radius: 10px;
/* -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3); */
background-color: #d5d5d5;
}
/* 火狐浏览器兼容 */
* {
scrollbar-color: #a0a0a0 #d4d4d4; /* 滑块颜色 滚动条背景颜色 */
scrollbar-width: thin; /* 滚动条宽度有三种:thin、auto、none */
}
隐藏自带的滚动条
.element::-webkit-scrollbar { width: 0 !important }
IE 10+
.element { -ms-overflow-style: none; }
Firefox
.element { overflow: -moz-scrollbars-none; }