DOMPDF< div>标记作为页眉和页脚 [英] DOMPDF <div> tag as header and footer
本文介绍了DOMPDF< div>标记作为页眉和页脚的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要使用DOMPDF在标记上创建页眉和页脚。如何能够做到这一点?
I need to create a header and footer on a tag using DOMPDF. how am i able to do this?
假设我有一个类的头像这样:
assuming i have a header class like this one:
<div class='header'>
<div>
<img scr='image1.png' style="width:100px; height:150px" />
<h1>This is header</h1>
</div>
</div>
和这样的页脚
<div class='footer'>
<div>
<img scr='image1.png' style="width:100px; height:150px" />
<h1>This is a footer. All rights reserved.</h1>
<img src = image2.png style="width:100px; height:150px;">
</div>
</div>
我想创建这些标签(类脚注和类头)来创建DOMPDF页眉和页脚
任何建议都非常感谢!干杯!
i want to create those tags (class footer and class header) to create the DOMPDF header and footer Any suggestion is highly appreciated! Cheers!
推荐答案
CSS:
position:fixed;
top: 0; or bottom: 0;
这篇关于DOMPDF< div>标记作为页眉和页脚的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文