HTML Dog
Skip to navigation

CSS Property: background-clip

The part of a box that a background (color or image) is painted upon.

Possible Values

ValueDescriptionExample
border-boxThe background covers the border, padding, and content areas of a box. The background will be seen behind a semi- (or fully-, for that matter) transparent border. Default behavior.
padding-boxThe background covers the padding and content areas of a box.
content-boxThe background covers the content area of a box.
[value], [value]For multiple backgrounds. Values separated by commas correspond to multiple images separated by commas with background-image.padding-box, content-box
inherit
initial
unset

Example


article { background-clip: padding-box; }
/* Any article background will be painted behind the content and padding areas but not the border area. */

Browser support