CSS background-clip property
Browser support · legacy reference
ChromeFully supports
SafariFully supports
FirefoxFully supports
Internet ExplorerFully supports
EdgeFully supports
OperaFully supports
Description
CSS background-clip property specifies the boundary of the background painting area.
Syntax
background-clip : border-box | padding-box | content-box
Property values
border-boxDefault
-
In this case, the background of all of the areas within border-box is painted such as content area, padding area, and border area.
- Try it
background-clip: border-box; padding-box
-
In this case, the areas that are within padding-box are painted such as the padding and the content areas.
- Try it
background-clip: padding-box; content-box
-
The only background of content-area is painted i.e. excluding the other two areas.
- Try it
background-clip: content-box;
Applicable to
It applies to all elements