【发布时间】:2015-04-28 16:16:11
【问题描述】:
我正在尝试从我的网站打印 33 页,但我需要使用 css 为每个打印页面添加页码我看到了很多解决方案,例如 How to print page number using css 、 get printed page number of an element 和 Page numbers with CSS/HTML 但对我没有任何作用,它在@bottom-right 中返回一个错误,即“不是已知的 CSS 属性名称”
我的 CSS :
<style type="text/css" >
@media print
{
table.break {page-break-after: left}
.no-print, .no-print *
{
display: none;
}
}
@page {
@bottom-right {
content: counter(page) " of " counter(pages);
}
}
</style>
【问题讨论】: