Remove the default browser header and footer when printing HTML

后端 未结 5 1153
深忆病人
深忆病人 2020-11-27 23:13

I got an HTML with the .

The question I\'m trying to ask is:

  • Is there any way to remove the strings
5条回答
  •  醉话见心
    2020-11-27 23:56

    For future reference:

    @page {
      margin: 0;
    }
    @media print {
      footer {
        display: none;
        position: fixed;
        bottom: 0;
      }
      header {
        display: none;
        position: fixed;
        top: 0;
      }
    }
    

提交回复
热议问题