繁体   English   中英

Chrome打印预览:每页底部的任何文本

[英]Chrome print preview: any text on the bottom of every page

我正在设计一个报告页面,却迷失了这个问题。 有谁知道如何在要打印的每一页的页脚中放置任何文本?

我已经设法在最后一个或第一个上做到这一点。 但不是每一个

这是我的代码

全页预览 (按Ctrl + P或Command + P)。

感谢您的所有建议!

这可能无济于事,但是如果您知道报告的大小(高度不会改变),则可以尝试执行以下操作。 使用@media查询仅在打印时显示:: after内容。

http://jsbin.com/dabusal/1/edit?html,css,输出

 .report-page { page-break-inside: avoid; page-break-after:always; height:880px; position:relative; border:1px dashed; } .report-page.report-page--last { page-break-after: avoid; } .report-page::after { content:'Footer Content ©2016'; position:absolute; bottom:0; left:0; } 
 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>JS Bin</title> </head> <body> <div class='report-page'>PAGE1</div> <div class='report-page report-page--last'>PAGE2</div> </body> </html> 

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM