[英]Page-break-after:always is being ignored by the browsers
I am mailing a HTML page as attachment. 我将HTML页面作为附件邮寄。
I have used <div style="page-break-after:always;> </div>
2 times here and there. 我在这里和那里两次使用
<div style="page-break-after:always;> </div>
。
It is supposed to be 3 pages, but the browser ignores the page breaks and removes all the empty space of the page and it's giving 2 pages after printing. 它应该是3页,但是浏览器会忽略分页符并删除页面的所有空白区域,并且在打印后给出2页。
The code is working fine with ThunderBird, the problem is with browsers. 该代码在ThunderBird上运行正常,问题在浏览器上。
How do I enforce this page break? 如何执行此分页符?
I don't think it's possible to display page breaks on a browser. 我认为不可能在浏览器上显示分页符。 As far as I know, browsers don't support paged media , and therefore ignore that kind of elements (including carriage returns).
据我所知,浏览器不支持分页媒体 ,因此会忽略这种类型的元素(包括回车)。
In a print preview, for instance, pagination should be displaying correctly. 例如,在打印预览中,分页应该正确显示。
Page breaks were introduced in CSS2 as a way of managing printed content, not content for the screen. 分页符是CSS2中引入的,它是一种管理打印内容而不是屏幕内容的方法。 This style tells your browser how to send web content to the printer.
此样式告诉您的浏览器如何将Web内容发送到打印机。 Browsers don't auto-paginate.
浏览器不会自动分页。
Edited for redundancy 编辑冗余
Sorry to raise a dead thread - but I found this during a search 抱歉引发死线程-但我在搜索过程中发现了这个问题
Did you use 你用过
<div style="page-break-after:always;> </div>
exactly? 究竟?
if so try putting in the closing " 如果是这样,请尝试在结尾处加上“
<div style="page-break-after:always;"> </div>
as of now (may 2013) page-break-after:always; 截至目前(2013年5月)page-break-after:always; is supported well - but IE 10 does have some issues.
受到很好的支持-但IE 10确实存在一些问题。
I don't think you can. 我认为你不能。 Support for
page-break-after
is limited. 对
page-break-after
支持有限。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.