我们上面提供的解决方案的坏消息。这破坏了在每个页面上都有表头的功能。
设置1) 设置“显示:块;”对于thead,将禁用在每个页面上都有表格标题的功能。
==>没有分页符
设置2) 将thead设置为“ display:table-header-group;”然后将其设置为“ table-row-group”,则Chrome将忽略分页符。
==>每页上没有表头
设置3)使用thead:“ display:table-header-group;” tbody:“ display:block”正在破坏列结构。主体将仅在第一列上呈现。
==>销毁表格。身体就在第一列
这是我们解决问题的技巧。我们使用设置3,与此: -我们只建立一列表格 -该列包含一个表格,其中包含我们真正要呈现的所有列 -列宽设置为固定值(无论如何,在我们的渲染系统中就是这种情况)
<table>
<thead>
<tr>
<td> <table> .... the header of the real table </table> </td>
</tr>
</thead>
<tbody style="display:block;">
<tr>
<td>
<table> .... one row of the real table </table>
<td>
</tr>
<tr>
<td>
<table> .... another row of the real table </table>
<td>
</tr>
</tbody>
</table>