html分(fēn)頁打印 每頁都有表頭、表尾

發布時間:2019年12月13日      浏覽次數:435 次
<!DOCTYPE html>
<html>
<head>
      <meta charset="utf-8" />
</head>
<body>
<table width="100%" cellpadding="4" cellspacing="0" bordercolordark="#FFFFFF" style="border-collapse:collapse; border-top:1px #666 solid; border-left:1px #666 solid;">
      <thead style="display:table-header-group">
            <tr style="page-break-inside: avoid;">
                  <td style=" border-right:1px #666 solid; border-bottom:1px #666 solid;">
                        <div align="center">打印時每頁都有表頭!</div>
                  </td>
            </tr>
      </thead>
      <tbody>
            <tr style="page-break-inside: avoid;">
                  <td height="300" style=" border-right:1px #666 solid; border-bottom:1px #666 solid;">
                        <div align="center">
                              表内容1
                        </div>
                  </td>
            </tr>
            <tr style="page-break-inside: avoid;">
                  <td height="300" style=" border-right:1px #666 solid; border-bottom:1px #666 solid;">
                        <div align="center">
                              表内容2
                        </div>
                  </td>
            </tr>
            <tr style="page-break-inside: avoid;">
                  <td height="300" style=" border-right:1px #666 solid; border-bottom:1px #666 solid;">
                        <div align="center">
                              表内容3
                        </div>
                  </td>
            </tr>
            <tr style="page-break-inside: avoid;">
                  <td height="300" style=" border-right:1px #666 solid; border-bottom:1px #666 solid;">
                        <div align="center">
                              表内容4
                        </div>
                  </td>
            </tr>
            <tr style="page-break-inside: avoid;">
                  <td height="300" style=" border-right:1px #666 solid; border-bottom:1px #666 solid;">
                        <div align="center">
                              表内容5
                        </div>
                  </td>
            </tr>
            <tr style="page-break-inside: avoid;">
                  <td height="300" style=" border-right:1px #666 solid; border-bottom:1px #666 solid;">
                        <div align="center">
                              表内容6
                        </div>
                  </td>
            </tr>
      </tbody>
      <tfoot style="display:table-footer-group;">
            <tr>
                  <td style=" border-right:1px #666 solid; border-bottom:1px #666 solid;">
                        <div align="center">打印時每頁都有表尾!</div>
                  </td>
            </tr>
      </tfoot>
</table>
</body>
</html>
免責聲明:本站相關技術文章信息部分(fēn)來自網絡,目的主要是傳播更多信息,如果您認爲本站的某些信息侵犯了您的版權,請與我(wǒ)(wǒ)們聯系,我(wǒ)(wǒ)們會即時妥善的處理,謝謝合作!