【问题标题】:table footer should be show at the bottom of each page during print in html在 html 中打印期间,表格页脚应显示在每个页面的底部
【发布时间】:2017-09-05 03:19:22
【问题描述】:

我想在打印期间在页面上显示页眉和页脚。所以我使用的代码是:

<table align="center">
    <thead style="display: table-header-group;">
        <tr>
            <td>
                Header
            </td>
        </tr>
    </thead>
    <tbody> Body data</tbody>
    <tfoot style="display: table-footer-group; bottom:0;">
    </tfoot>
</table>

标题和内容显示正确。页脚也显示在每页的末尾是正确的。但问题是当最后一页内容只有一行时,页脚显示在该行之后而不是页面底部。

【问题讨论】:

标签: html css


【解决方案1】:

在 index.php 中重命名您的 index.html。创建一个footer.php。 在footer.php中插入你的页脚代码

进入您的 index.html 并将以下代码添加到您要添加页脚的部分:

<?php

include 'footer.php';

?>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-03-11
    • 2017-10-11
    • 1970-01-01
    • 2019-08-18
    • 2013-07-03
    • 1970-01-01
    • 2020-01-13
    相关资源
    最近更新 更多