The background-clip property sets how far a background-color or background-image may paint. Clip it to the border box, the padding box, the content box, the letters, or the border area.
A thick border and some padding make the three box keywords easy to compare. background-origin is different: it chooses where position and size are measured from, not where the paint stops.
Standard-track.
Not deprecated. border-box, padding-box, and content-box are Baseline. text is widely used; keep -webkit-background-clip: text for older engines. border-area is Limited availability (Chrome 150+, Safari 18.2+, not Firefox).
Paint a gradient. The image sits behind the text first.
Clip to the glyphs.background-clip: text keeps only the paint that falls inside the letters. Keep -webkit-background-clip: text for older WebKit and Chromium builds.
Hide the ink.color: transparent removes the solid fill so the clipped gradient shows through.
Keep contrast. If the gradient fails to load, transparent text disappears. Add a fallback background-color, and check contrast for readers with low vision. You can gate the effect with @supports.
Edge Cases & Pitfalls
If every keyword looks the same, one of these is usually why.
border
Opaque borders hide border-box
The background is always painted under the border. A solid opaque border covers that paint. Use a dashed border or a transparent border color to see border-box.
origin
Clip is not origin
background-origin sets the positioning area. Clip sets the paint cutoff. You can set them to different boxes on purpose.
text
Opaque text hides text
If color is solid, you mostly see the ink, not the clipped background. Use a transparent (or very translucent) text color.
root
No effect on the root element
On the document root, background-clip does nothing. Put canvas backgrounds on body instead.
shorthand
One box in the shorthand can set clip
In the background shorthand, a single box keyword can set both origin and clip. Two box keywords set origin then clip. Prefer the longhands while you learn.
Compatibility
Browser Support
background-clip is a browser painting property. Node.js, Deno, and Bun do not paint it. Versions below are for the classic box keywords unless noted.
✓ Baseline · Box values since 2015
background-clip
border-box / padding-box / content-box: Chrome 1+, Firefox 4+, Safari 3+, Edge 12+, Internet Explorer 9+, Opera 10.5+. text: keep -webkit- for older engines. border-area: Chrome 150+, Safari 18.2+.
96%Box keywords support
Google Chrome1+ boxes · text unprefixed 120+
Full support
Mozilla Firefox4+ boxes · text 49+
Full support
Apple Safari3+ boxes · text 14+
Full support
Microsoft Edge12+ boxes · text unprefixed 120+
Full support
Opera10.5+ boxes
Full support
Samsung InternetClassic boxes supported
Full support
Internet Explorer9+ boxes · No text
Partial
background-clipWidely supported
Bottom line: Safe for border-box, padding-box, and content-box in current browsers and Internet Explorer 9+. For text, also set -webkit-background-clip: text. border-area is Limited availability: Chrome 150+, Safari 18.2+, and not in Firefox.
Remember
Key Takeaways
Role: choose how far the background may paint — border, padding, content, text, or border area.
Default:border-box. Use a dashed or transparent border when you need to see paint under the border.
Not origin: origin places the image; clip cuts the paint.
Gradient text:background-clip: text, -webkit-background-clip: text, and a transparent text color.
One line:background-clip decides where the background stops — after you have a background, and usually after you have padding or a border to compare.
Frequently Asked Questions
It sets how far a background color or image is allowed to paint: under the border, only through the padding, only in the content box, only inside the letters, or only in the border area.
border-box. The background reaches the outer border edge and sits behind the border. With a solid opaque border you may not notice that paint under the border.
background-origin chooses the box used for background-position and background-size. background-clip chooses where the paint is cut off. They share keywords but do different jobs.
Set a background-image gradient, then background-clip: text and -webkit-background-clip: text. Make the text transparent with color: transparent so the gradient shows through the letters.
The background is always painted under the border. A solid opaque border hides that area. Use a dashed border, a gap, or a transparent border color to see border-box.
border-box, padding-box, and content-box are Baseline: Chrome 1+, Firefox 4+, Safari 3+, Edge 12+, Internet Explorer 9+. text is widely used; keep -webkit-background-clip: text for older engines. border-area needs Chrome 150+ or Safari 18.2+ and is missing in Firefox. It is a browser CSS property, not a Node.js feature.