How to use HTML to print header and footer on every printed page of a document?

前端 未结 20 1350
迷失自我
迷失自我 2020-11-21 16:51

Is it possible to print HTML pages with custom headers and footers on each printed page?

I\'d like to add the word \"UNCLASSIFIED\" in Red, Arial, size 16pt to the t

20条回答
  •  情书的邮戳
    2020-11-21 17:00

    From this question -- add the following styles to a print-only stylesheet. This solution will work in IE and Firefox, but not in Chrome (as of version 21):

    #header {
      display: table-header-group;
    }
    
    #main {
      display: table-row-group;
    }
    
    #footer {
      display: table-footer-group;
    }
    

提交回复
热议问题