CSS Property: background-clip
The part of a box that a background (color or image) is painted upon.
Possible Values
Value | Description | Example |
---|---|---|
border-box | The 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-box | The background covers the padding and content areas of a box. | |
content-box | The 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. */