1. 程式人生 > 其它 >element-ui表格修改背景色、文字和去掉邊框和底部的白線和增加斑馬線和

element-ui表格修改背景色、文字和去掉邊框和底部的白線和增加斑馬線和

// 修改表格的背景色
.common-table-container .el-table,
.common-table-container .el-table__expanded-cell {
  //background-color: transparent !important;
  background-color: #313856;
  color: #fff;
}
// 去掉表格的邊框
.common-table-container .el-table th,
.common-table-container .el-table td {
  background-color: transparent !important;
}
.assets-table-container .el-table th,
.assets-table-container .el-table td,
.order-table-container .el-table th,
.order-table-container .el-table td
{
  border: none !important;
}
//修改表格的斑馬線
.el-table tr:nth-child(even) {background: #283049}
.el-table tr:nth-child(odd) {background: transparent}

//表格文字居中
.audit__table-container .cell {
  text-align: center !important;
}
//去掉表格單元格邊框
.audit__table-container .el-table tr th,
.audit__table-container .el-table tr td{
  border: none;
}
//表格文字顏色
.audit__table-container .el-table tr td{
  color: #909399;
}
//表格單元格右邊框
.audit__table-container .el-table tr td:not(:last-child) {
  border-right: 1px solid #eee;
}
//去掉底部的白線
.common-table-container .el-table::before {
  left: 0;
  bottom: 0;
  width: 100%;
  height: 0px;
}
 // 表格高度100%
  .el-tabs{
  height: 100%;
}