Element-UI el-table背景颜色透明

效果:在这里插入图片描述

el-table的背景颜色是白色的,若想重新设置背景颜色,官方文档并没有给出属性设置,需要直接通过css设置。
效果:1.背景颜色透明 2.去边框 3.字体颜色 4.在每行添加不同颜色圆点
这里直接贴代码:

 .regional_table {
    margin: auto;
  }
  .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;
  }
  /* 表格前的圆点 */

  /deep/.el-table td:nth-child(1):before {
    content: "";
    display: block;
    position: absolute;
    width: 7px;
    height: 7px;
    background: #5078fc;
    top: 20px;
    border-radius: 100%;
  }
  /deep/.el-table tr:nth-child(1) td:nth-child(1):before {
    content: "";
    display: block;
    position: absolute;
    width: 7px;
    height: 7px;
    background: #fe3548;
    top: 20px;
    border-radius: 100%;
  }
  /deep/.el-table tr:nth-child(2) td:nth-child(1):before {
    content: "";
    display: block;
    position: absolute;
    width: 7px;
    height: 7px;
    background: #ffb343;
    top: 20px;
    border-radius: 100%;
  }
  /deep/.el-table tr:nth-child(3) td:nth-child(1):before {
    content: "";
    display: block;
    position: absolute;
    width: 7px;
    height: 7px;
    background: #03a9f4;
    top: 20px;
    border-radius: 100%;
  }
  /** */


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值