记录自己的编程记录本文结合了两篇文章了ElementUI中的el-table表格设置全透明(组件化开发和html两种方式)_诗水人间的博客-CSDN博客_elementui表格背景透明
Element-UI el-table背景颜色透明_爬墙少年_OC的博客-CSDN博客_el-table背景颜色
两个文章得到的结论 想要实现el-table 表格透明先要用一个div标签包裹那个表格,方便进行类选择。然后在进行相关操作才能实现表格透明化。
看到class=regional_table没 那个就是关键
/*最外层透明*/
.regional_table /deep/ .el-table,
.regional_table /deep/ .el-table__expanded-cell {
background-color: transparent;
color: white;
}
/* 表格内背景颜色 */
.regional_table /deep/ .el-table th,
.regional_table /deep/ .el-table tr,
.regional_table /deep/ .el-table td {
background-color: transparent !important;
//表格字体颜色
color: white;
}
改完之后效果如下