我使用page-break-inside: avoid;
进行分页符,效果很好。但是在第二页中,顶部没有空白。
<div class="section-wrapper keep-together">
<div class="section-title">
<p class="title">{{ $section['certification']['title'] }}</p>
<p class="line"></p>
</div>
<div class="content">
<div class="content-row">
<div class="description">
<p>{!! $section['certification']['data']['details'] !!}</p>
</div>
</div>
</div>
</div>
.section-wrapper {
position: relative;
margin-bottom: 3%;
.section-title {
.title {
font-size: 2rem;
font-weight: 700;
text-transform: uppercase;
color: $color-blue;
padding: 0 80px;
}
}
.desc {
margin-bottom: 2rem;
font-weight: 300;
font-size: 1.5rem;
text-align: left;
}
}
}
}
第二页需要一些空白。我正在使用laravel 5.7和snappy pdf