局部滚动条样式
// 滚动条的宽度
/deep/ .el-table__body-wrapper::-webkit-scrollbar {
width: 6px; // 横向滚动条
height: 6px; // 纵向滚动条 必写
}
// 滚动条的滑块
/deep/ .el-table__body-wrapper::-webkit-scrollbar-thumb {
background-color: #ddd;
border-radius: 3px;
}
全局滚动条样式
//滚动条的宽度
::-webkit-scrollbar {
width: 8px;
height: 8px;
background-color: #e4e4e4;
border-radius: 6px;
}
//滚动条的滑块
::-webkit-scrollbar-thumb {
background-color: #a1a3a9;
border-radius: 6px;
}
滚动条样式存在兼容性问题,以上的样式是在webkit浏览器下可生效的
修改滚动条样式
.treeScrollbar::-webkit-scrollbar-track-piece {
//滚动条凹槽的颜色,还可以设置边框属性
background-color: #f1f1f1;
}
.treeScrollbar::-webkit-scrollbar {
//滚动条的宽度
width: 10px;
height: 10px;
}
.treeScrollbar::-webkit-scrollbar-thumb {
//滚动条的设置
background-color: #c1c1c1;
background-clip: padding-box;
min-height: 28px;
border-radius: 8px;
}
.treeScrollbar::-webkit-scrollbar-thumb:hover {
background-color: #a8a8a8;
}
最直接
.tableListValue{
width: 19vw;
margin-left: 0.8vh;
//滚动条的宽高
::-webkit-scrollbar {
width: 2.1vh;
height: 2.1vh;
}
//滚动条的滑块背景色
::-webkit-scrollbar-thumb {
background: #ccc;
border-radius: 1vh;
}
//滚动条的背景色
::-webkit-scrollbar-track {
background: rgba(#ccc,0.3);
}
}