我有一张横跨多页的桌子。头版在第二页重复,内容重叠。
我正在使用引导,并确保来自其他wkhtmltopdf重叠解决方案的css在我的页面中实现。
thead { display: table-header-group; }
tfoot { display: table-row-group; }
tr { page-break-inside: avoid; }
table, tr, td, th, tbody, thead, tfoot, td div {
page-break-inside: avoid !important;
}
发布于 2016-09-01 16:06:11
该表被包装在一个<div class="table-responsive">
中。这是引起问题的原因。
我添加了以下CSS以更改表响应的div上处理overflow的方式。
.table-responsive { overflow-x: visible !important; }
这解决了我的问题。
基思
发布于 2022-02-23 10:55:39
这对我有用。在本表中:
<table class="webgrid-table">
<thead>
<tr>
//your code
</tr>
</thead>
</table>
只添加以下css类:
.webgrid-table thead {
display: table-header-group;
}
.webgrid-table tfoot {
display: table-row-group;
}
.webgrid-table tr {
page-break-inside: avoid;
}
https://stackoverflow.com/questions/39276254
复制相似问题