elementPlus中el-table设置背景透明,修改底部边框颜色

前提问题:表格设置背景透明,并且修改底部边框颜色

解决过程:elementPlus中修改el-table背景和边框样式,第一使用deep,第二在el-table外层加一层div

解决结果:

html:

<div class="topTable">       
    <el-table :data="state.tableData" class="tableSpec" height="100%" >
        <el-table-column prop="date" label="名称" align="center" show-overflow-tooltip/>
        <el-table-column prop="ss" label="次数" align="center"/>
        <el-table-column prop="name" label="概率" align="center"/>
        <el-table-column prop="address" label="总数" align="center"/>              
        <el-table-column prop="address" label="状态" align="center" show-overflow-tooltip>
            <template #default="scope">
                <span style="color:#5AEE93">
                   {{ scope.row.address }}
                </span>
            </template>
        </el-table-column>
    </el-table>
</div>

css:

.topTable{
    height: 70%;
    margin: 0.05rem 0;
    .tableSpec{
        width: 100%;
        --el-table-border-color: rgba(222, 253, 255, 0.16);
     }
     :deep(.el-table){
        background-color: transparent;
     }
     :deep(.el-table__expanded-cell){
        background-color: transparent;
     }
     :deep(.el-table th){
        background-color: rgba(0, 238, 246, 0.08) !important;
        color: #00FFFF;
        font-size: 0.06rem;
     }
     :deep(.el-table tr){
        background-color: transparent !important;
        color: #FFFFFF;
     }
     :deep(.el-table td){
        background-color: transparent !important;
     }
     .el-table__fixed::before{
        background-color: transparent;
     }
}

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值