Web4College

CSS background-clip property

src

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;
Try it

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;
Try it

content-box

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

background-clip: content-box;
Try it

Applicable to

It applies to all elements