element-ui table表格修改背景透明
原本样式
**
- html中使用,css中加入如下代码即可
**
.el-table,
.el-table__expanded-cell {
background-color: transparent !important;
} */
/* 表格内背景颜色 */
/*
.el-table th,
.el-table tr,
.el-table td {
background-color: transparent !important;
}
新的改变
组件化开发
less则需要加上/deep/生效,还有注意作用域要是scoped
/*最外层透明*/
/deep/ .el-table, /deep/ .el-table__expanded-cell{
background-color: transparent;
}
/* 表格内背景颜色 */
/deep/ .el-table th,
/deep/ .el-table tr,
/deep/ .el-table td {
background-color: transparent;
}