MPDF-位置绝对和底部0

问题描述 投票:0回答:1

我想在页脚中修复表格,但它是在生成PDF时使用的。

在浏览器中使用有效,但在生成pdf时无效。

<table width="100%" style="position:absolute; bottom:0">
    <thead>
    <tr>
        <th width="33%" style="border-top: 1px solid #000">Assinatura</th>
        <th width="33%"></th>
        <th width="33%"></th>
    </tr>
    </thead>
</table>
mpdf
1个回答
1
投票

将表格包裹在DIV标记中,并绝对放置DIV。

<div style="position:absolute; bottom:0">

    <table width="100%">
        <thead>
        <tr>
            <th width="33%" style="border-top: 1px solid #000">Assinatura</th>
            <th width="33%"></th>
            <th width="33%"></th>
        </tr>
        </thead>
    </table>

</div>
© www.soinside.com 2019 - 2024. All rights reserved.