[英]CSS Paged Media Contents Issue
when printing HTML page I want to put custom text in header an all printed pages 当打印HTML页面时,我想将自定义文本放在所有打印页面的标题中
@page {
margin-top:5mm;
margin-bottom: 25mm;
margin-left: 30mm;
margin-right: 30mm;
@top-right{
content: "Page title"; /* page title + current page count */
}
}
While printing, the "Page Title: pageCount" does not appear neither in IE nor in any other browsers.. What am I doing wrong? 在打印时,“页面标题:pageCount”没有出现在IE或任何其他浏览器中。 Margins do work, but not the @top-right.
边距确实有效,但@ top-right无效。
I think the issue is that there is no browser support for @top-right and the other page margin boxes. 我认为问题在于浏览器不支持@ top-right和其他页面边距框。
If rendering the content to a PDF prior to printing is an option for you, the Prince PDF generator appears to support margin boxes. 如果您可以选择在打印之前将内容呈现为PDF,则Prince PDF生成器似乎支持边距框。
http://en.wikipedia.org/wiki/Comparison_of_layout_engines_(Cascading_Style_Sheets)#Grammar_and_rules http://en.wikipedia.org/wiki/Comparison_of_layout_engines_(Cascading_Style_Sheets)#Grammar_and_rules
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.