CSS:从2而不是1开始对页面进行编号 [英] CSS: Start numbering pages with 2 instead of 1
本文介绍了CSS:从2而不是1开始对页面进行编号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在CSS中,带有:
@page { @top-right { content: "Page " counter(page) " of " counter(pages); } }
打印页面时,我可以在每个页面的顶部显示页码。这很好。但是现在,如何才能使页码以2而不是1开头?我可以通过修改上面的CSS规则来做到这一点吗?
I can have page numbers displayed at the top of every page when the page is printed. This works great. But now, how can I make it so the page number starts with 2 instead of 1? Can I do that by modifying the CSS rule above?
推荐答案
如果您使用的是飞碟(我的情况),请使用以下CSS:
If you are using Flying Saucer (which was my case), use the following CSS:
table {-fs-table-paginate:paginate; }
table { -fs-table-paginate: paginate; }
它就像一个护身符。和飞碟岩石:)。强烈推荐。
It works like a charm. And Flying Saucer rocks :). Really highly recommended.
这篇关于CSS:从2而不是1开始对页面进行编号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文