1

我用过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

4

0 回答 0