1,添加style:
::ng-deep .ant-table-body table{
margin: 0% !important;
}
2,通过 [nzScroll] 指定纵向滚动条及高度
<nz-table [nzScroll]="{ y: '280px' }">
</nz-table>
3,通过 [nzWidth] 指定th和td的宽度(我用的百分比)
我一共就五列,所以每列 20%
<th style="width: 20%;"></th>
<td style="width: 20%;"></td>
![在这里插入图片描述](https://img-blog.csdnimg.cn/35b2400d88a84287878acf84e827d0e7.png#pic_center)