Search w3schools.com:

SHARE THIS PAGE

CSS Reference

CSS Reference CSS Selectors CSS Reference Aural CSS Web Safe Fonts CSS Units CSS Colors CSS Color Values CSS Color Names CSS Color HEX CSS3 Browser Support

CSS Properties

CSS3 background-clip Property


Example

Specify the painting area of the background:

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

Try it yourself »

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The background-clip property is supported in Internet Explorer 9+, Firefox, Opera, Chrome, and Safari.

Note: The background-clip property is not supported in Internet Explorer 8 and earlier versions.


Definition and Usage

The background-clip property specifies the painting area of the background.

Default value: border-box
Inherited: no
Version: CSS3
JavaScript syntax: object.style.backgroundClip="content-box"


Syntax

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

Value Description Play it
border-box The background is clipped to the border box Play it »
padding-box The background is clipped to the padding box Play it »
content-box The background is clipped to the content box Play it »


Related Pages

CSS3 tutorial: CSS3 Backgrounds



Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]