CSS | box decoration break Property
The box-decoration-break property is used to control the box decoration after fragmentation of paragraph. It defines the background, padding, border, margin, and clip-path of an element that is applied when the box for the element is broken into separated parts.
Syntax:
box-decoration-break: slice|clone|initial|inherit;
Property values:
slice: This property breaks the edges of the element fragments as a whole.
- Syntax:
box-decoration-break: slice;
- Example:
<!DOCTYPE html><html><head><title>box-decoration-break property</title><style>body {text-align:center;width:80%;}span {border: 2px solid green;padding: 5px;border-radius: 6px;font-size: 24px;line-height: 3;}span.geek{-webkit-box-decoration-break: slice;-o-box-decoration-break: slice;box-decoration-break: slice;}.gfg {font-size: 40px;color: green;font-weight: bold;}</style></head><body><divclass="gfg">GeeksforGeeks</div><divclass="geeks">A computer science portal for geeks</div><h2>box-decoration-break: slice;</h2><spanclass="geek">Prepare for the Recruitment driveof product based companies<br>like Microsoft, Amazon, Adobe etcwith a free online placement<br>preparation course. The course focuseson various MCQ's & Coding<br>question likely to be asked in theinterviews & make your<br>upcoming placement season efficientand successful.</span></body></html>chevron_rightfilter_none - Output:

Clone: It is used to decorate each fragment of the element as if the fragments were unbroken, individual elements. Borders wrap the four edges of each fragment of the element, and backgrounds are redrawn in full for each fragment.
- Syntax:
box-decoration-break: clone;
- Example:
<!DOCTYPE html><html><head><title>box-decoration-break property</title><style>body {text-align:center;width:80%;}span {border: 2px solid green;padding: 5px;border-radius: 6px;font-size: 24px;line-height: 3;}span.geek{-webkit-box-decoration-break: clone;-o-box-decoration-break: clone;box-decoration-break: clone;}.gfg {font-size: 40px;color: green;font-weight: bold;}</style></head><body><divclass="gfg">GeeksforGeeks</div><divclass="geeks">A computer science portal for geeks</div><h2>box-decoration-break: clone;</h2><spanclass="geek">Prepare for the Recruitment driveof product based companies<br>like Microsoft, Amazon, Adobe etcwith a free online placement<br>preparation course. The course focuseson various MCQ's & Coding<br>question likely to be asked in theinterviews & make your<br>upcoming placement season efficientand successful.</span></body></html>chevron_rightfilter_none - Output:

initial: It sets the property to its default value.
- Syntax:
box-decoration-break: initial;
- Example:
<!DOCTYPE html><html><head><title>box-decoration-break property</title><style>body {text-align:center;width:80%;}span {border: 2px solid green;padding: 5px;border-radius: 6px;font-size: 24px;line-height: 3;}span.geek{-webkit-box-decoration-break: initial;-o-box-decoration-break: initial;box-decoration-break: initial;}.gfg {font-size: 40px;color: green;font-weight: bold;}</style></head><body><divclass="gfg">GeeksforGeeks</div><divclass="geeks">A computer science portal for geeks</div><h2>box-decoration-break: initial;</h2><spanclass="geek">Prepare for the Recruitment driveof product based companies<br>like Microsoft, Amazon, Adobe etcwith a free online placement<br>preparation course. The course focuseson various MCQ's & Coding<br>question likely to be asked in theinterviews & make your<br>upcoming placement season efficientand successful.</span></body></html>chevron_rightfilter_none - Output:

Supported Browsers: The browsers supported by box-decoration-break Property are listed below:
- Google Chrome 22.0 -webkit-
- Firefox 32.0
- Opera 11.5 -webkit-
- Safari 6.1 -webkit-
Recommended Posts:
- CSS | text-decoration Property
- CSS | text-decoration-style Property
- CSS | text-decoration-color Property
- CSS | text-decoration-line Property
- CSS | word-break Property
- CSS | page-break-after Property
- CSS page-break-before Property
- CSS | page-break-inside Property
- What is the difference between “word-break: break-all” versus “word-wrap: break-word” in CSS ?
- JavaScript | Break and Continue
- How to break line without using <br> tag in HTML / CSS ?
- PHP break (Single and Nested Loops)
- How to break nested for loop using JavaScript?
- How to prevent column break within an element?
- How to insert line break before an element using CSS?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



