Backgrounds Clip
The following classes control the background clip of elements:
.bg-clip-border
.bg-clip-border
Sets the background-clip property to "border-box", which clips the background image to the border box of the element.
CSS equivalent: background-clip: border-box;
Example usage:
In the example above, the background image will be clipped to the border box of the element.
.bg-clip-padding
.bg-clip-padding
Sets the background-clip property to "padding-box", which clips the background image to the padding box of the element.
CSS equivalent: background-clip: padding-box;
Example usage:
In the example above, the background image will be clipped to the padding box of the element.
.bg-clip-content
.bg-clip-content
Sets the background-clip property to "content-box", which clips the background image to the content box of the element.
CSS equivalent: background-clip: content-box;
Example usage:
In the example above, the background image will be clipped to the content box of the element.
.bg-clip-text
.bg-clip-text
Sets the background-clip property to "text", which clips the background image to the foreground text of the element.
CSS equivalent: background-clip: text;
Example usage:
In the example above, the background image will be clipped to the text of the element.
These utility classes provide control over how the background image is clipped within the element, allowing you to create interesting visual effects and enhance the design of your web page.
Last updated