MPDF - different background for first page

こ雲淡風輕ζ 提交于 2020-01-05 09:29:14

问题


I am using MPDF to generate PDF-files out of HTML code. Unfortunately, the layout for the first page is different from the rest of the pages.

Is there any way to give the first page a different background from the rest? And how about layout, is there any way to set the header and footer on a different place or remove the whole header from the second till last page?


回答1:


<style>
@page :first {
    background: url("http://example.com/first.svg") 50% 0 repeat;
}
@page {
    background: url("http://example.com/page.svg") 50% 0 repeat;
}
...
</style>


来源:https://stackoverflow.com/questions/34606741/mpdf-different-background-for-first-page

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!