element-UI el-table樣式(去邊框和滾動條樣式)


去邊框:

給el-table綁定class=“customer-table”

.customer-table th {
  border: none;
}
.customer-table td,
.customer-table th.is-leaf {
  border: none;
}

.el-table--border,
.el-table--group {
  border: none;
}

.customer-table thead tr th.is-leaf {
  border-right: none;
}
.customer-table thead tr th:nth-last-of-type(2) {
}

.el-table--border::after,
.el-table--group::after {
  width: 0;
}
.customer-table::before {
  width: 0;
}
.customer-table .el-table__fixed-right::before,
.el-table__fixed::before {
  width: 0;
}

.el-table--border th.gutter:last-of-type {
  border-left: none;
}

  效果:

 

 

滾動條樣式:

全局el-table

*::-webkit-scrollbar {
  width: 4px;
  height: 10px;
  background-color: transparent;
} /*定義滾動條高寬及背景 高寬分別對應橫豎滾動條的尺寸*/
*::-webkit-scrollbar-track {
  background-color: #8db4fd;
  border-radius: 2px;
} /*定義滾動條軌道 內陰影+圓角*/
*::-webkit-scrollbar-thumb {
  background-color: #1a3f81;
  border-radius: 2px;
} /*定義滑塊 內陰影+圓角*/
.scrollbarHide::-webkit-scrollbar {
  display: none;
}
.scrollbarShow::-webkit-scrollbar {
  display: block;
}
效果:

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM