前言
项目中,根据后台返回动态路由,然后前端权限判断,有时候左侧菜单栏的高度太长,浏览器会自动生成默认滚动条。样式很难看,如何取消,下面代码可以实现。适合element Ui/element-plus
代码
在需要修改的页面中直接写入就行。
.el-aside {
height: 100vh;
background-color: #ffffff;
overflow-y: auto;
-ms-overflow-style: none; /* Edge */
scrollbar-width: none; /* Firefox */
&::-webkit-scrollbar {
display: none; /* WebKit */
}
}