LOADING...

加载过慢请开启缓存(浏览器默认开启)

loading

修改Element样式的几种方法

Vue中修改样式

// 第一种/deep/
/deep/ .test {
 ***
}

// 第二种::v-deep
::v-deep .test{
 ***
}

table样式修改

在一个有时候会遇到修改elementuitable的全部样式,下面就来对应的去修改下的:

  • 修改表格头部背景
::v-deep .el-table th{
    background: orange;
}
  • 修改表格行背景
::v-deep .el-table tr{
   background: #eee;
}
  • 修改斑马线表格的背景
::v-deep .el-table--striped .el-table__body tr.el-table__row--striped td {
    background: #ccc;
}
  • 修改行内线的颜色
::v-deep .el-table td,.building-top .el-table th.is-leaf {
    border-bottom:  2px solid #eee;
}
  • 修改表格最底部边框颜色和高度
::v-deep .el-table::before{
   border-bottom:  1px solid #ccc;
    height: 3px
}
  • 修改表头字体颜色
::v-deep .el-table thead {
    color: #ccc;
    font-weight: 700;
}
  • 修改表格内容字体颜色和字体大小
::v-deep .el-table{
    color: #6B91CE;
    font-size: 14px;
}
  • 修改表格无数据的时候背景,字体颜色
::v-deep .el-table__empty-block{
    background: #ccc;
}
::v-deep .el-table__empty-text{
  color: #fff
}
  • 修改表格鼠标悬浮hover背景色
::v-deep .el-table--enable-row-hover .el-table__body tr:hover>td {
    background-color: pink;
}
img_show