我有以下结构,我正在尝试在打印时在<section class="section"></section>
中间停止分页符:
HTML:
<div class="tailoredmenu">
<div class="wrap">
<div role="main">
<article class="article">
<section class="section">...</section>
</article>
</div>
</div>
</div>
这就是我正在尝试的,有时奇怪的只是有效:
CSS:
.tailoredmenu > .wrap > .article > .section {
page-break-before: auto;
page-break-after: auto;
page-break-inside: avoid;
}
有更好的方法吗?还尝试过:
.tailoredmenu > .wrap > .article > section {
page-break-before: auto;
page-break-after: auto;
page-break-inside: avoid;
}