mpdf - MPDF - 绝对位置和底部 0
问题描述
我想在页脚中修复一个表格,但它是在生成 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>
解决方案
将表格包装在 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>
推荐阅读
- amazon-web-services - 从 AWS CloudWatch 指标数学 SEARCH 函数获取单个时间序列
- html - 如何制作这种布局?(三重嵌套 Div)
- typescript - 具有泛型类型的索引签名断言
- python - Plotly:如何以交互方式更改 3D 散点图的轴变量?
- mysql - 如何在 MySQL 中对没有前缀名称的名称进行排序?
- proxy - 代理骨干网/中介
- sql - 如何在同一查询中将一个数据字段用于另一个 case 表达式
- python - 选择与列表中的值匹配的 id
- r - R:识别一列中的非 NA 值并创建数据框,其中选择了另一列基于行的值
- mongodb - MongoDB - 查找两个集合之间的差异