我想在打印的时候在每一页打印页码。
我想通过关闭浏览器打印预览设置来实现这一点。
这是我的代码。
.rptFooter {
counter-reset: footerNum;
}
.rptFooter:after {
counter-increment: footerNum;
content: "Page " counter(footerNum) " of " counter(footerNum) ;
}
我进入每一页
第 1 页,共 1 页
最佳答案
尝试使用默认基础:
@page {
counter-increment: page;
counter-reset: page 1;
@top-right {
content: "Page " counter(page) " of " counter(pages);
}
}
如图所示:
关于jquery - 如何使用CSS打印页码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25535269/