CSS background-clip property

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.

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.

background-clip: padding-box;

content-box

The only background of content-area is painted i.e. excluding the other two areas.

background-clip: content-box;

Applicable to

It applies to all elements

#CSS digger
Was this article helpful?

 
arrow

We are observing background-clip property for different values of the background-clip property.

×

Ctrl+D