@media打印工作正常,但正文内容与页眉和页脚重叠

时间:2018-06-16 08:06:04

标签: html css

@media print工作正常,但正文内容与headerfooter重叠。

divContent应位于每页的页眉和页脚之间。请给我一些意见



<style>
  @media print {
    div.divFooter {
      position: fixed;
      bottom: 0;
    }
    div.divHeader {
      position: fixed;
      top: 0;
    }
  }
</style>
<div class="divHeader">
  HEADER <br />HEADER <br />HEADER <br />HEADER <br />HEADER <br />HEADER <br />
</div>

<div class="divContent">
  <p>Content placeholder START...</p>
  <p>Content placeholder ...</p>
  <p>Content placeholder ...</p>
  <p>Content placeholder ...</p>
  <p>Content placeholder ...</p>
  <p>Content placeholder ...</p>
  <p>Content placeholder ...</p>
  <p>Content placeholder ...</p>
  <p>Content placeholder ...</p>
  <p>Content placeholder ...</p>
  <p>Content placeholder ...</p>
  <p>Content placeholder ...</p>
  <p>Content placeholder ...</p>
  <p>Content placeholder ...</p>
  <p>Content placeholder ...</p>
  <p>Content placeholder ...</p>
  <p>Content placeholder ...</p>
  <p>Content placeholder ...</p>
  <p>Content placeholder ...</p>
  <p>Content placeholder ...</p>
  <p>Content placeholder ...</p>
  <p>Content placeholder ...</p>
  <p>Content placeholder ...</p>
  <p>Content placeholder ...</p>
  <p>Content placeholder ...</p>
  <p>Content placeholder ...</p>
  <p>Content placeholder ...</p>
  <p>Content placeholder ...</p>
  <p>Content placeholder ...END</p>

</div>

<div class="divFooter">
  footer <br />footer <br />footer <br />footer <br />footer <br />footer <br />
</div>
&#13;
&#13;
&#13;

0 个答案:

没有答案