问题描述
美好的一天,
我的项目有问题。我使用printThis.js 打印页面。 创建新页面时会出现此问题。第 1 页的页眉是正常的/没问题,但在随后的页面中,页顶的填充会消失,并且标题或顶部会碰到边框。
这似乎是什么问题?提前致谢。
HTML
<div class="page">
<table>
<thead>
<tr>
<th style="height:50px;">
header
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<p>something here</p>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td style="height:50px;">
footer
</td>
</tr>
</tfoot>
</table>
</div>
CSS
.page {
margin: 0;
border: initial;
border-radius: initial;
width: initial;
min-height: initial;
Box-shadow: initial;
background: initial;
page-break-after: always;
background-color: #FFF;
}
table {
border-collapse: collapse !important;
page-break-after:always !important;
}
thead{
display: table-header-group !important;
}
tr,td{
page-break-inside:avoid !important;
page-break-after:auto !important;
}
p{
word-wrap: break-word;
}
This is the screenshot of page1 and page 2
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)