CSS background-clip Property

Definition and Usage

background-clip The attribute specifies the drawing area of the background.

See Also:

CSS Tutorial:CSS Background,CSS Background (Advanced)

HTML DOM Reference Manual:backgroundClip Property

Example

Specifies the drawing area of the background:

div
{
background-color:yellow;
background-clip:content-box;
}

Try It Yourself

CSS Syntax

background-clip: border-box|padding-box|content-box;

Property Value

Value Description Test
border-box The background is clipped to the border box. Test
padding-box The background is clipped to the padding box. Test
content-box The background is clipped to the content box. Test

Technical Details

Default Value: border-box
Inheritance: no
Version: CSS3
JavaScript Syntax: object.style.backgroundClip="content-box"

Browser Support

The numbers in the table indicate the first browser version that fully supports this property.

Chrome Edge Firefox Safari Opera
Chrome IE / Edge Firefox Safari Opera
4.0 9.0 4.0 3.0 10.5