Is there a way to get a web page header/footer printed on every page?

前端 未结 4 1845
轻奢々
轻奢々 2020-11-27 05:55

Based on my research, it seems that what I want to do is not possible, but in case something has changed, I wanted to check to see if anyone had come up with a way to do thi

4条回答
  •  一生所求
    2020-11-27 06:37

    This will work in some browsers, not not all. I don't think there is an elegant cross-browser solution

    Include the print footer/header you want in divs on the page (in this example div id='printableFooter')

    In the screen css file put:

    #printableFooter {display: none;}
    

    In the print css file:

    #printableFooter {display: block; position: fixed; bottom: 0;}
    

提交回复
热议问题