打印预览中页脚后面有一个白色的空白区域,我想删除该空间并将页脚修复在页面底部。我试过这个代码
@page {
size: A4;
margin: 0;
}
@media print {
footer {
position: fixed;
bottom: 0;
width: 100%;
}
此代码有效,但文本打印了两次并且彼此重叠
无位置页脚的CSS:固定:
@media print {
footer {
position: relative; /* or use normal flow */
bottom: 0;
width: 100%;
}
}
如果问题仍然存在,您需要进一步检查 HTML 结构和 CSS 样式,以识别打印过程中重复内容或重叠文本的任何潜在原因。