现在有个问题就是 el-table的表格但是用了 fixed属性;
业务需要修改 滚动条样式,滚动条样式设置窄了之后右侧的滚动条就会有缝隙
但是这个项目还需要兼容 火狐,
覆盖样式
.el-table__fixed,
.el-table__fixed-right {
height: auto !important;
}
可以直接覆盖原element-ui的样式。代码如下
//滑块布局
.el-table__body-wrapper::-webkit-scrollbar {
width: 10px; //横向滚动条
height: 10px; //横向滚动条
background-color:red;
}
//滚动条滑块
.el-table__body-wrapper::-webkit-scrollbar-thumb {
background: #CACACA;
border-radius: 5px;
height: 120px;
}
//轨道颜色
.el-table__body-wrapper::-webkit-scrollbar-track {
border-radius: 5px;
background-color:red;
}
.el-table__body-wrapper::-webkit-scrollbar-corner {
background-color:red;
}
//当没有滚动条的时候
.el-table__body-wrapper.is-scrolling-none~.el-table__fixed-right{
right: 0px !important;
}
// 当有滚动条的时候 默认偏移距离
.el-table--scrollable-y .el-table__fixed-right{
right: 9px !important;
}