O'Reilly logo

CSS Pocket Reference, 4th Edition by Eric A. Meyer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

background-clip

Values:

<bg-box> [ , <bg-box> ]*

Expansions:

<bg-box>

border-box | padding-box | content-box

Initial value:

border-box

Applies to:

All elements

Inherited:

No

Computed value:

Same as declared value

Description:

Defines the boundary within the element box at which the background is clipped; that is, no longer drawn. Historically, this has been equivalent to the default value of border-box, where the background goes to the outer edge of the border area. This property allows more constrained clipping boxes at the outer edge of the padding area and at the content edge itself.

Examples:

body {background-clip: content-box;}
.callout {
     background-clip: content-box, border-box,
     padding-box;}

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required