html 打印显示页眉页脚及表格一行被分到两页的问题
2022-01-19 本文已影响0人
xcyzjs
1. 每页表头问题
参考: The Ultimate Print HTML Template with Header & Footer | by Idan Cohen | Medium
使用 table 中的 thead 会在每页打印其中的内容, 而不需要打印页眉页脚的页面(头2页, 3页等), 继续使用 div static 布局
2. table row 被分到两页的问题
对 tr 使用 break-inside-avoid, break-after-auto
参考: How to Handle Page Breaks when Printing a Large HTML Table