检测内容中的分页符

时间:2012-07-12 22:59:49

标签: html css

如何检测div内容中的换行符?

让我们说,我在这样的页面上有几个div -

    <div id="header" style='width:500px;'> Header content </div>

    <div id="container" style='overflow:vscroll;'> dynamic content </div>

    <div style="page-break-after:always">&nbsp;</div>

当我打印此页面时,如果容器div内的内容是多个页面,则标题不会出现在第二页或更多页面上。我需要在每个页面上显示标题。

非常感谢任何帮助。

1 个答案:

答案 0 :(得分:0)

而不是div使用表与thead和tbody。将在所有页面上重复表标题。 How to create a table with thead

相关问题