vue2中element ui组件库,el-table实现滚动条只想出现在滚动区域,左右两侧固定列的下方不让出现滚动条
先看图,是个el-table表格,左右两侧都是固定列,滚动条会出现在表格整体的下方,现在有个需求,只让滚动条出现在中间可滚动区域的下方。看图就完事
我把代码贴上来,我是这样的实现的,目前还没看出来有啥问题
::v-deep ::-webkit-scrollbar {width: 0px;height: 10px;margin-left: 360px;margin-right: 300px;
}::v-deep ::-webkit-scrollbar-thumb {background-color: #c0c0c0;border-radius: 3px;margin-left: 360px;margin-right: 300px;
}::v-deep ::-webkit-scrollbar-track {background-color: #f1f1f1;margin-left: 360px;margin-right: 300px;
}
注意:
1、width:0px 必须设置
2、这3处class类中marigin-left和margin-right必须相同,不然不生效,你看我写的样式就完事。