antd table tr 取消内边框
时间: 2023-10-22 11:06:46 浏览: 331
以下是如何取消 antd table 的 tr 元素内边框的方法:
1. 使用 CSS 样式表
```css
.ant-table-tbody > tr > td {
border: none;
}
```
2. 使用 tableProps 属性
在 Table 组件中设置 tableProps 属性,将 td 的 border 属性设置为 none。
```jsx
<Table
dataSource={dataSource}
columns={columns}
tableProps={{ bordered: false, style: { border: 'none' } }}
/>
```
相关问题
取消 antd table tr padding
要取消antd表格(tr)的padding,您可以使用以下CSS样式:
```css
.ant-table-tbody > tr > td {
padding: 0;
}
```
这将覆盖antd表格(tr)的默认样式,并将其内部填充设置为0。请注意,这样做可能会影响表格的外观和布局,因此您需要根据自己的需要进行调整。
eact Antd Table 组件 修改tr的边框颜色
您可以通过自定义CSS来修改Antd Table组件中tr的边框颜色。以下是示例代码:
```css
.ant-table-tbody > tr.ant-table-row:hover > td,
.ant-table-tbody > tr.ant-table-row-selected:hover > td,
.ant-table-tbody > tr:hover > td {
border: 1px solid #1890ff; /* 修改边框颜色为蓝色 */
}
```
您可以将上述CSS代码添加到您的项目中的样式文件中,并根据需要进行修改。当鼠标悬停在tr上时,边框颜色将更改为蓝色。
阅读全文
相关推荐
















