The background-clip property determines the background painting area, which determines the area within which the background is painted.

  • Initial valueborder-box
  • Applies toAll elements
  • InheritedNo
  • MediaVisual
  • Computed valueAs specified
  • AnimatableNo
  • CSS VersionCSS3
  • JavaScript syntaxobject.style.backgroundClip
Formal syntax: <box> [ , <box> ]* 

background-clip: border-box;
background-clip: padding-box;
background-clip: content-box;
<box> = border-box | padding-box | content-box
  • border-boxThe background extends to the outside edge of the border (but underneath the border in z-ordering).
  • padding-boxNo background is drawn below the border (background extends to the outside edge of the padding).
  • content-boxThe background is painted within (clipped to) the content box.
.class {
   backround-clip: padding-box;
}
?Firefox?Explorer?Chrome?Safari?Opera


Last updated on 23rd March 2014 By Rene Spronk

View All CSS Properties

Errors? Please help to keep this list up to date, If you find any errors, please contact us, so that we can get them fixed.