【发布时间】:2022-01-26 10:43:14
【问题描述】:
我在 Laravel 中使用 Mpdf 生成 PDF,但是当我使用填充时它会增加宽度和高度,尽管我使用的是 box-sizing:border-box。
这是我的代码:
<div class="header">
<div class="row">
<div class="col-xs-5"
style="width:500px; padding-left:100px ;background-color:blue;page-break-inside: avoid; box-sizing: border-box;">
<img src="{{ public_path('img/dashboard/system/pc-loader.png') }}">
</div>
<div class="col-xs-7 mb-2 pt-3 text-right"
style="background-color:black; box-sizing: border-box !important;">
<img src="data:image/svg;base64, {!! $qrcode !!}">
<p class="mt-1 mb-0 text-xs fw-bold">{{ $patient->username }}</p>
</div>
</div>
</div>
在我的 CSS 中:
*,
*:before,
*:after {
color: #000 !important;
text-shadow: none !important;
background: transparent !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
}
【问题讨论】:
标签: php html css laravel twitter-bootstrap