修改el-table 表格的背景颜色

vue中修改

/*最外层透明*/
::v-deep .el-table,
      ::v-deep .el-table__expanded-cell {
        background-color: transparent !important;
      }
      /* 表格内背景颜色 */
      ::v-deep .el-table th,
      ::v-deep .el-table tr,
      ::v-deep .el-table td {
        background-color: transparent !important;
        border: 0; //去除表格
      }
/*去除底边框*/
::v-deep.el-table td.el-table__cell {
  border: 0;
}
::v-deep.el-table th.el-table__cell.is-leaf {
  border: 0;
}

其他方法:

<style lang="less" scoped>
 .table-wrapper /deep/ .el-table--fit{
        padding: 20px;
}
 .table-wrapper /deep/  .el-table, .el-table__expanded-cell {
    background-color: transparent;
}

 .table-wrapper /deep/ .el-table tr {
    background-color: transparent!important;
}
 .table-wrapper /deep/  .el-table--enable-row-transition .el-table__body td, .el-table .cell{
    background-color: transparent;
}
</style>
.regional_table /deep/ .el-table,
  .el-table__expanded-cell {
    background-color: transparent;
  }
  .regional_table /deep/ .el-table th {
    background-color: transparent !important;
    border-bottom: 1px solid #5078fc;
    color: #fefefe;
  }
  .regional_table /deep/ .el-table tr {
    background-color: transparent !important;
  }
  .regional_table /deep/ .el-table--enable-row-transition .el-table__body td,
  /deep/.el-table .cell {
    background-color: transparent;
    color: rgba(255,255,255,0.7);
    border: none;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  /deep/.el-table th>.cell {
    color:rgba(254,254,254,1);
    font-weight: 700;
  }
  .el-table::before {
    //去除底部白线
    left: 0;
    bottom: 0;
    width: 100%;
    height: 0px;
  }
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容