编辑:我刚刚注意到这适用于 IE9,但不适用于 IE10 和 Chrome。
我们以电子方式从我们的供应商之一接收 HTML 格式的 PO 报告。我们通常打印这些,以前每页放1个PO,但现在不加分页符了。我检查了 html,但不明白为什么它突然不起作用。这是(格式不正确的)html:
<HEAD>
<STYLE TYPE='text/css'><!--
BR.breakhere {page-break-after: always}
.tb1{font:10pt Arial;}
.tb2{border-left:1px solid #000000; border-right:1px solid #000000;border-top: 1px solid #000000;border-bottom: 1px solid #000000;}
.tb3{font:10pt Arial;border-left:1px solid #000000; border-right:1px solid #000000;border-top: 1px solid #000000;border-bottom: 1px solid #000000;}
.tb4{font-size:8pt;}
--></STYLE>
</HEAD>
分页符应该出现在这里:
<BR class=breakhere>
它紧接在 TABLE 元素之后,TABLE 在最后一个 TR 之后有一个 HR(呃)。
<BR><HR style = "width:100%;height:10px;color:#000000"></TABLE><BR class=breakhere>
我想联系他们并提及此事,但我不确定这是代码还是我们这边的问题?我已经尝试了所有浏览器、多台打印机和工作站,但无法让它中断页面。
谢谢!
最佳答案
分页符对于 Internet Explorer 来说是不够的。如果你试试这个,你可以看到结果。我有同样的问题,但我通过这种方式解决了。
<div style="page-break-after: always;"></div>
<div>
</div>
关于html - {分页后 : always} not working when printing,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16989843/