The background-clip CSS property sets whether an element's background extends underneath its border box, padding box, or content box. In the first content-box example, the browsers default margins are applied to the paragraph, and the background clips after the margin. Learn to earn: BitDegree free online courses give you the best online education with a gamified experience. All rights reserved. Note: For documents whose root element is an HTML element: if the computed value of background-image on the root element is none and its background-color is transparent, user agents must instead propagate the computed values of the background properties from that element's first HTML child element. My main source of learning this property is CSS Tricks and as you can see, my example follows it almost to the letter. By default, only responsive variants are generated for background clip utilities. WebDemo of the different values of the background-clip property. WebCSS background-clip. The paragraph is the divs content. Site design / logo 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA. By clicking Post Your Answer, you agree to our terms of service, privacy policy and cookie policy. What does "you better" mean in this context of conversation? It is recommended that authors of HTML documents specify the canvas background for the element rather than the HTML element. Why is sending so few tanks Ukraine considered significant? How can we cool a computer connected on top of or within a human brain? To control the bounding box of an element's background at a specific breakpoint, add a {screen}: prefix to any existing background clip utility.