-
The
background-clip
CSS property sets whether an element's background extends underneath itsborder box
padding box
content box
-
The background is always drawn behind the border, so
background-clip: border-box
has a visual effect only when the border is partially opaque or has transparent or partially opaque regions values
border-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-width
andborder-style
into account but ignoring any transparency introduced byborder-color