1. 在全局中改,找到public文件夹,添加样式
<style>
/* //滚动条的宽度 */
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
/* //滚动条的滑块 */
::-webkit-scrollbar-thumb {
background-color: #a1a3a9;
border-radius: 3px;
}
</style>
单独修改elementUI中表格table的滚动条,在项目中用到table的文件中添加
// 滚动条的宽度
/deep/ .el-table__body-wrapper::-webkit-scrollbar {
width: 8px; // 横向滚动条
height: 8px; // 纵向滚动条 必写
}
// 滚动条的滑块
/deep/ .el-table__body-wrapper::-webkit-scrollbar-thumb {
background-color: #ddd;
border-radius: 3px;
}