我正在为reactjs应用程序使用antd表。
我在这里创建了Sandbox,以便您进行更改。有没有人能帮我画出像下面这样的圆角边框?
期望值:
我已经尝试添加带有边框相关css的rowClassName={() => "rowClassName1"}
,但是边框不会显示出来。
发布于 2020-11-03 13:57:13
尝试这种方法,
.rowClassName1 td:first-child {
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
}
.rowClassName1 td:last-child {
border-top-right-radius: 10px;
border-bottom-right-radius: 10px;
}
工作演示:- https://codesandbox.io/s/antd-table-rounded-border-row-forked-9u4x9?file=/src/App.js
发布于 2020-11-03 14:20:09
@UKS的答案为我解决了这个问题,并且能够制作圆角边框的行。
如果有人想要改变标题样式以及行。
.monitorTableStyle .ant-table-container .ant-table-content table .ant-table-thead tr th:first-child{
border-top-left-radius: 15px !important;
border-bottom-left-radius: 15px !important;
}
.monitorTableStyle .ant-table-container .ant-table-content table .ant-table-thead tr th:last-child{
border-top-right-radius: 15px;
border-bottom-right-radius: 15px;
}
https://stackoverflow.com/questions/64657247
复制相似问题