大屏el-table 背景颜色,滚动条和边框 css处理

/*  deep 穿透展現表格滾動條 */

::v-deep .el-table {
  // th高度
 th.el-table__cell div{
  height: 1.43vw;
  line-height: 1.43vw;
}
// td高度
 td.el-table__cell div{
  height: 1.2vw;
  line-height: 1.2vw;
}
// 卸载掉背景颜色
tbody tr:hover>td {
    background-color:unset !important //修改成自己想要的颜色即可
 }
 tr{
  background-color:rgba(#fff, 0);
}
  .el-table__cell {
    padding: 0.2vh !important;
  }
td.el-table__cell,th.el-table__cell.is-leaf {
    border: none;
  }

  .el-table__header-wrapper,
  th.el-table__cell {
    background-color: rgba(#fff, 0.04); // 表头背景色
    font-family: MicrosoftYaHeiUI-Bold, MicrosoftYaHeiUI;
    font-weight: bold;
    color: #ffffff;
    // opacity: 0.04;
  }
  .el-table__body-wrapper {
    height: 16vh;
    overflow-y: scroll;
    &::-webkit-scrollbar {
      z-index: 11;
      // width: 6px;
      display: normal;
    }
    // &::-webkit-scrollbar-track,
    // &::-webkit-scrollbar-corner {
      // background: #fff;
      // background-color: #09203b;
    // }
    // &::-webkit-scrollbar-thumb {
      // border-radius: 5px;
      // width: 6px;
      // background: #b4bccc;
    // }
    // &::-webkit-scrollbar-track-piece {
      // background: #fff;
      // background-color: #0c2646;
      // width: 6px;
      // border: none; // 滚动条去边框
    // }
  }
}
// 表格背景色
::v-deep .el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell {
  background: none !important;
  background-color: rgba(#fff, 0.04) !important;
}
// 表格边框
::v-deep .el-table td.el-table__cell,
.el-table th.el-table__cell.is-leaf {
  border-bottom: none !important;
}
// 表格底部边框
::v-deep .el-table::before {
  height: 0 !important;
}
// 表格头部边框
::v-deep .el-table th.el-table__cell.is-leaf,
.el-table td.el-table__cell {
  border-bottom: none !important;
}
::v-deep .el-table td.el-table__cell,
.el-table th.el-table__cell.is-leaf {
  border-bottom: none !important;
}
::v-deep .el-table__empty-block {
  background-color: rgba(#fff, 0.04) !important;
}

  • 7
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值