-
The
background-clipCSS property sets whether an element's background extends underneath itsborder boxpadding boxcontent box
-
The background is always drawn behind the border, so
background-clip: border-boxhas a visual effect only when the border is partially opaque or has transparent or partially opaque regions valuesborder-box
The background extends to the outside edge of the border (but underneath the border inz-ordering)-
padding-box- The background extends to the outside edge of the padding
- No background is drawn beneath the border
-
content-box
The background is painted within (clipped to) thecontent box -
text
The background is painted within (clipped to) the foreground text -
border-area
The background is painted within (clipped to) the area painted by theborder, takingborder-widthandborder-styleinto account but ignoring any transparency introduced byborder-color