Horje
What is the purpose of using the CSS box-decoration-break Property ?

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.



Reffered: https://www.geeksforgeeks.org


CSS

Related
Explain the Box Model Components in CSS Explain the Box Model Components in CSS
How to Align One Item to the Right using CSS Flexbox ? How to Align One Item to the Right using CSS Flexbox ?
How to make div Collapse Over Each Other ? How to make div Collapse Over Each Other ?
How to add Rounded Corners on Video in HTML ? How to add Rounded Corners on Video in HTML ?
CSS Examples CSS Examples

Type:
Geek
Category:
Coding
Sub Category:
Tutorial
Uploaded by:
Admin
Views:
13