How to print with page numbers in @media print?

后端 未结 1 994
盖世英雄少女心
盖世英雄少女心 2020-12-10 09:02

I have been seeking this answer for a while now and wasn\'t able to find anything that could work properly. I had these two ideas that kind of look like weren\'t working at

相关标签:
1条回答
  • 2020-12-10 09:45

    After a while doing some research I think I got something cooking here which still needs some testing in different browsers, and maybe some perfectioning. For now, I've tested and seems to be working fine in Chrome.

    Basically, blending in a little of both techniques I was able to create this idea that replicates (on load) a h3 for each p in the work (just so it runs enough for each page). They have position: absolute and each one subtracts 100vh so they go to the bottom of the other page.

    Here it is: JSFiddle - Without Page Total

    EDIT

    Here's a new version capable of showing the page total: JSFiddle - With Page Total

    Hope this has some use!

    0 讨论(0)
提交回复
热议问题