The box-decoration-break Property in CSS is used to control the rendering behavior of box decorations, such as borders and backgrounds when a box is broken across multiple lines. It allows you to determine whether these decorations should behave as continuous or broken across line breaks.
Note: The box-decoration-break Property accepts values like slice and clone .
Syntax:
/* Ensuring that borders and backgrounds
are continuous across line breaks */
.element {
box-decoration-break: clone;
}
Features:
The Features of box-decoration-break Property:
- Defines how box decorations are rendered when a box is broken across lines.
- Values include
slice (default) and clone .
- Particularly useful for ensuring the continuity of borders and backgrounds in multi-line elements, such as headings or paragraphs.
|