1. 布局
  2. 断行前

布局

break-before

用于控制列或页面在元素之前如何换行的工具。

ClassStyles
break-before-auto
break-before: auto;
break-before-avoid
break-before: avoid;
break-before-all
break-before: all;
break-before-avoid-page
break-before: avoid-page;
break-before-page
break-before: page;
break-before-left
break-before: left;
break-before-right
break-before: right;
break-before-column
break-before: column;

示例

基础示例

使用 break-before-columnbreak-before-page 等工具来控制在元素之前列或页面换行的行为:

<div class="columns-2">
<p>好吧,让我告诉你一些事情,...</p>
<p class="break-before-column">当然,可以笑啊...</p>
<p>也许我们可以不需要...</p>
<p>听着。如果你认为这是...</p>
</div>

响应式设计

Prefix a break-before utility with a breakpoint variant like md: to only apply the utility at medium screen sizes and above:

<div class="break-before-column md:break-before-auto ...">
<!-- ... -->
</div>

Learn more about using variants in the variants documentation.