<el-scrollbar:native="false" class="style">
内容
</el-scrollbar>
.style{
height: 650px;overflow-y: auto;
}
//给el-scrollbar标签设置高度即可
原生滚动条
.slide {margin-top: 20px;height: 650px;overflow-y: auto;}
// 滚动条样式修改
.slide::-webkit-scrollbar {/*滚动条整体样式*/
width: 10px;/*高宽分别对应横竖滚动条的尺寸*/
height: 1px;
}
.slide::-webkit-scrollbar-thumb {/*滚动条里面小方块*/
border-radius: 10px;
-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
background-color: #222838 !important;
//background: #535353;
}
.slide::-webkit-scrollbar-track {/*滚动条里面轨道*/
-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
border-radius: 10px;
background: rgba(63, 72, 84, .7);
其中.slide为出现滚动条容器的类名