我正在使用以下CSS代码将我的页脚放在页面底部:
<style type="text/css">
@page {
@bottom-center { content: element(footer); }
}
#footer {position: running(footer);}
</style>
Run Code Online (Sandbox Code Playgroud)
有没有办法将它显示得稍微高一点?添加margin-bottom: 50px似乎没有效果.
更新:页面将使用iText转换为PDF
我终于设法使用以下CSS:
<style type="text/css">
@page {
margin-bottom: 100px;
@bottom-center {
content:element(footer);
}
}
#footer {
position: running(footer);
}
</style>
Run Code Online (Sandbox Code Playgroud)
以前,我只尝试在@ bottom-center和#footer中添加margin-bottom.
| 归档时间: |
|
| 查看次数: |
2894 次 |
| 最近记录: |