Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/77.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何在打印的每个页面上显示徽标?_Html_Css_Twitter Bootstrap 3_Printing Web Page - Fatal编程技术网

Html 如何在打印的每个页面上显示徽标?

Html 如何在打印的每个页面上显示徽标?,html,css,twitter-bootstrap-3,printing-web-page,Html,Css,Twitter Bootstrap 3,Printing Web Page,我为我的客户设计报告。 当客户打印报告时,我需要在每页上显示徽标 以下是我在打印模式下希望放在每页页眉上的html行: <img style="page-break-before:always" src="/somepath/Content/images/logo.png" class="visible-print" style="width:200px;height:100px" alt="" /> 有什么方法可以实现它吗?HTML/CSS中没有对您所需内容的官方支持 对于要

我为我的客户设计报告。 当客户打印报告时,我需要在每页上显示徽标

以下是我在打印模式下希望放在每页页眉上的html行:

<img style="page-break-before:always" src="/somepath/Content/images/logo.png" class="visible-print" style="width:200px;height:100px" alt="" />


有什么方法可以实现它吗?

HTML/CSS中没有对您所需内容的官方支持

对于要用作页眉的元素(或底部:0表示页脚),使用position:fixed和top:0有一个变通方法,但它在WebKit浏览器上不起作用,因此或多或少都是无用的

也许您可以使用一个库来导出为PDF,您可以在其中指定页眉/页脚或任何其他需要的元素。
一个图书馆的例子是

谢谢你的回答。我尝试使用position:fixed和top:0,但出现重叠。您知道如何避免重叠吗?