在使用element ui时,我们总是需要把他的样式修改为自己的样式,
如下图:
修改之前:
修改之后:
去掉背景颜色
.el-table, .el-table__expanded-cell {
background-color: transparent!important;
}
.el-table th, .el-table tr {
border: 0!important;
background-color: transparent!important;
}
去掉边框线
.el-table--border tr,td{
border: none!important;
}
.el-table::before{
height:0;
}
修改滚动条样式
/*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
::-webkit-scrollbar {
width: 7px; /*滚动条宽度*/
height: 7px; /*滚动条高度*/
background-color: rgb(0, 12, 46);
}
/*定义滑块 内阴影+圆角*/
::-webkit-scrollbar-thumb {
-webkit-box-shadow: inset 0 0 6px rgba(216, 39, 39, 0.3);
background-color: rgb(0, 12, 46); /*滚动条的背景颜色*/
}
修改高亮
.el-table--enable-row-hover .el-table__body tr:hover>td{
background-color:rgb(0, 12, 46) !important;
}
修改头部字体
.el-table thead{
color:rgba(32,253,250,0.7)!important;
}