布局
用于控制元素片段如何在多行、多列或多个页面上呈现的工具。
Class | Styles |
---|---|
box-decoration-clone | box-decoration-break: clone |
box-decoration-slice | box-decoration-break: slice |
使用 box-decoration-slice
和 box-decoration-clone
工具来控制背景、边框、边框图像、盒阴影、剪切路径、边距和内边距等属性是否应被呈现为一个连续的片段,或作为不同的块:
box-decoration-slice
box-decoration-clone
<span class="box-decoration-slice bg-linear-to-r from-indigo-600 to-pink-500 px-2 text-white ..."> 你好<br />世界</span><span class="box-decoration-clone bg-linear-to-r from-indigo-600 to-pink-500 px-2 text-white ..."> 你好<br />世界</span>
Prefix a box-decoration-break
utility with a breakpoint variant like md:
to only apply the utility at medium screen sizes and above:
<div class="box-decoration-clone md:box-decoration-slice ..."> <!-- ... --></div>
Learn more about using variants in the variants documentation.