【发布时间】:2015-02-11 10:23:43
【问题描述】:
我想打印我的 html 页面。我有超过 1 页,我只想在最后一页的底部打印我的页脚。我的CSS
@page {
size: 8.5in 11.0in;
margin-left: 0.7cm;
margin-top: 0.7cm;
margin-top: 0.7cm;
margin-bottom: 2.6cm;
margin-right: 0.5cm
}
#footer {
clear: both;
position: running(footer);
z-index: 10;
margin-top: -1em;
vertical-align: bottom;
height: 5%;
}
@page {
@bottom-center {
content: element(footer);
}
}
HTML:
<body><div id="content"></div>
<div id="footer"></div>
<body>
它有效,但是当我的内容最后有非常大的表格时,例如 6 页表格,我的页脚会填充所有带有表格的页面。
【问题讨论】:
标签: html css pdf-generation