Background-clip Sets whether the element’s background (background image or color) extends to the border, inside margin box, and below the content box.

Introduction to the

The initial value Applicable elements Whether to inherit attributes
border-box All the elements no

MDN has detailed documentation,Click to jump to

Application scenarios

1.Vant Layout Row Col

The spacing is achieved by setting the padding-right. In this case, you need to set the element’s background-clip so that the background color does not extend beyond the padding.

background-clip: content-box;
Copy the code