Property Description
The background-clip property specifies the painting area of the background.
This property has the following syntax:
background-clip: border-box|padding-box|content-box|initial|inherit;
Property Values
| Value | Description |
|---|---|
| border-box | (default) The background is clipped to the border box |
| padding-box | The background is clipped to the padding box |
| content-box | The background is clipped to the content box |
| initial | Specifies that the value of the property should be set to the default value |
| inherit | Specifies that the value of the property should be inherited from the parent element |
Examples
This example shows how to the painting area of the background:
div {
background-color: yellow;
background-clip:content-box;
-webkit-background-clip:content-box; /* Safari */
}
Browser Support
| Chrome | Firefox | IE | Safari | Opera |
|---|---|---|---|---|
| 4.0 | 4.0 | 9.0 | 3.0 | 10.5 |
Miscellaneous Information
| Inherited: | No |
|---|---|
| Defined In: | CSS3 |
| Default Value: | border-box |
