CSS分页媒体内容问题 [英] CSS Paged Media Contents Issue
问题描述
打印HTML页面时我想将自定义文本放在所有打印页面的页眉中。
@page {
margin-top:5mm;
margin-bottom:25mm;
margin-left:30mm;
margin-right:30mm;
@ top-right {
content:Page title; / *页面标题+当前页数* /
}
}
打印,页面标题:pageCount不会出现在IE和任何其他浏览器..
我做错了什么?
我认为问题是没有浏览器支持@
如果在打印之前将内容呈现为PDF是您的选择,则 Prince PDF生成器支持边框。 /en.wikipedia.org/wiki/Comparison_of_layout_engines_(Cascading_Style_Sheets )#Grammar_and_rulesrel =nofollow> http://en.wikipedia.org/wiki/Comparison_of_layout_engines_(Cascading_Style_Sheets)#Grammar_and_rules
when printing HTML page I want to put custom text in header an all printed pages
@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? Margins do work, but not the @top-right.
I think the issue is that there is no browser support for @top-right and the other page margin boxes.
If rendering the content to a PDF prior to printing is an option for you, the Prince PDF generator appears to support margin boxes.
http://en.wikipedia.org/wiki/Comparison_of_layout_engines_(Cascading_Style_Sheets)#Grammar_and_rules
这篇关于CSS分页媒体内容问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!