布局
用于控制元素内部如何进行列或页面换行的工具。
Class | Styles |
---|---|
break-inside-auto | break-inside: auto; |
break-inside-avoid | break-inside: avoid; |
break-inside-avoid-page | break-inside: avoid-page; |
break-inside-avoid-column | break-inside: avoid-column; |
使用 break-inside-column
和 break-inside-avoid-page
等工具来控制元素内部列或页面换行的行为:
<div class="columns-2"> <p>好吧,让我告诉你一些事情,...</p> <p class="break-inside-avoid-column">当然,继续,笑吧...</p> <p>也许我们可以没有...</p> <p>看。如果你认为这是...</p></div>
Prefix a break-inside
utility with a breakpoint variant like md:
to only apply the utility at medium screen sizes and above:
<div class="break-inside-avoid-column md:break-inside-auto ..."> <!-- ... --></div>
Learn more about using variants in the variants documentation.