elementplus表格加个边框
时间: 2023-12-12 22:34:43 浏览: 148
以下是element plus表格加边框的方法:
```html
<template>
<el-table :data="tableData" style="width: 100%" class="table-border">
<el-table-column prop="date" label="日期" width="180"></el-table-column>
<el-table-column prop="name" label="姓名" width="180"></el-table-column>
<el-table-column prop="address" label="地址"></el-table-column>
</el-table>
</template>
<style>
/* 去掉表格边框颜色 */
.table-border .el-table--border::after,
.table-border .el-table--group::after,
.table-border .el-table::before {
background-color: #12333C!important;
}
.table-border .el-table--border,
.table-border .el-table--group {
border-color: #12333C!important;
}
/* 表头下面的白线去掉 */
.table-border .el-table th.el-table__cell.is-leaf{
border-bottom: 0!important;
}
/* 减小行高 */
.table-border .el-table .el-table__cell {
padding: 5px 0!important;
}
</style>
```
阅读全文
相关推荐
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![pptx](https://img-home.csdnimg.cn/images/20241231044947.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)