Layout

box-decoration-break

Utilities for controlling how element fragments should be rendered across multiple lines, columns, or pages.

ClassStyles
box-decoration-clone
box-decoration-break: clone
box-decoration-slice
box-decoration-break: slice

Examples

Basic example

Use the box-decoration-slice and box-decoration-clone utilities to control whether properties like background, border, border-image, box-shadow, clip-path, margin, and padding should be rendered as if the element were one continuous fragment, or distinct blocks:

box-decoration-slice

Hello
World

box-decoration-clone

Hello
World
<span class="box-decoration-slice bg-linear-to-r from-indigo-600 to-pink-500 px-2 text-white ...">  Hello<br />World</span><span class="box-decoration-clone bg-linear-to-r from-indigo-600 to-pink-500 px-2 text-white ...">  Hello<br />World</span>

Responsive design

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.

Copyright © 2025 Tailwind Labs Inc.·Trademark Policy

Tailwind CSS 中文网(本网站)的目标是为中文开发者提供准确、及时的 Tailwind CSS 中文文档

Tailwind CSS 中文文档由本网站维护人员共同翻译,采用 MIT 开源协议发布

本网站与 tailwindcss.com 及 Tailwind Labs Inc. 并无从属关系

Tailwind 商标由 Tailwind Labs Inc. 所有

京ICP备15031610号-8