如何解决填充顶部在下一页消失
美好的一天,
我的项目有问题。我使用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 举报,一经查实,本站将立刻删除。