Home CSS Properties box-reflect CSS box-reflect Property Definition
Definition and Usage box-reflect is the usual name for the real property -webkit-box-reflect. It draws a mirrored copy of an element in one direction: above, below, left, or right.
The initial value is none. You can add an offset length and an optional mask (often a linear-gradient()) so the reflection fades out. For standard effects that work more widely, see box-shadow , filter , or transform .
Non-standard WebKit prefix onlyThere is no unprefixed box-reflect. Use -webkit-box-reflect as progressive enhancement. Firefox does not support it.
Syntax
CSS Syntax -webkit-box-reflect: none | above | below | left | right || <length> || <image> | initial | inherit ;
Direction first, then optional gap, then optional mask. Example: below 10px linear-gradient(transparent, white).
Values
Property Values Value Description Try it noneDefault. No reflection Try itbelowMirror under the element Try itaboveMirror above the element Try itleftMirror to the left Try itrightMirror to the right Try it<length>Gap between the element and its reflection (e.g. 10px) Try it<image>Mask for the reflection, often a gradient fade Try itinitialResets to none Try itinheritTakes the parent value Try it
Approach
How to Use -webkit-box-reflect Pick a direction, then optionally add space and a fade mask.
Set -webkit-box-reflect to a direction such as below. Add a length if you want a gap (for example below 12px). Add a mask image if you want a soft fade (for example a linear-gradient()). Leave room in the layout so the reflection is not clipped, and check the page in Firefox without the effect. Piece Required? Role Direction Yes above, below, left, or rightOffset Optional Space between the original and the mirror Mask Optional Fades or shapes the reflection (see also mask-image ideas)
Try it
Live Preview Change only -webkit-box-reflect. Supporting browsers show a mirror; Firefox shows the card alone.
Code
CSS Examples Each snippet focuses on -webkit-box-reflect. Use Try It Yourself for a live editor.
1. Below 2. Offset 3. Fade mask Example 1 — Reflect Below A simple mirror under the box.
<style>
.box {
-webkit-box-reflect: below;
}
</style>
<div class="box">Reflect</div> How It Works Use the real property name. Write -webkit-box-reflect, not an unprefixed box-reflect.Choose a direction. below places the mirror under the element.No offset yet. The reflection sits flush against the bottom edge.Supporting browsers only. Elsewhere you still see the original box.Example 2 — Gap Under the Card A length adds space between the element and its mirror.
<style>
.box {
-webkit-box-reflect: below 12px;
}
</style>
<div class="box">Reflect</div> How It Works Keep the direction. Still below.Add a length. 12px is the gap between the card and the mirror.Order matters. Direction, then offset, then mask.Give the layout room. Padding or height must fit the reflection plus the gap.Example 3 — Soft Fade Mask A gradient mask makes the mirror look like a soft reflection.
<style>
.box {
-webkit-box-reflect: below 0 linear-gradient(transparent, white);
}
</style>
<div class="box">Reflect</div> How It Works Direction + offset + mask. below 0 keeps the gap at zero.Mask with a gradient. linear-gradient(transparent, white) fades the reflection.Opaque parts show. White in the mask keeps the mirror visible; transparent hides it.Still decorative. Do not rely on the fade for meaning or layout. Edge Cases & Pitfalls Treat reflections as optional paint. Layout and meaning must work without them.
prefix No unprefixed property box-reflect alone does nothing. Always write -webkit-box-reflect.
firefox Missing in Firefox Firefox ignores the declaration. Check that the design still looks complete without a mirror.
clip Overflow can hide the mirror Parents with overflow: hidden or tight height often clip below / above reflections.
a11y Decorative only Do not put required text only in a reflection. Prefer reduced-motion friendly designs for busy effects.
standard Not on the standards track MDN lists it as non-standard. Prefer widely supported tools like box-shadow or opacity when you need a safe fallback look.
Compatibility
Browser Support -webkit-box-reflect is a browser style property . Node.js, Deno, and Bun do not apply it. It is non-standard and missing in Firefox.
✓ Non-standard · Not in Firefox
-webkit-box-reflect Chrome 4+, Safari 4+, Chromium Edge, Opera, and Samsung Internet. Firefox: no support. Use only as progressive enhancement.
Google Chrome 4+
Full support
Apple Safari 4+
Full support
Microsoft Edge Chromium
Full support
Opera Modern
Full support
Samsung Internet Modern
Full support
Mozilla Firefox All
Not supported
Internet Explorer All
Not supported -webkit-box-reflect WebKit / Chromium; not Firefox
Bottom line: Ship reflections as optional decoration. Always verify the page without -webkit-box-reflect.
Remember
Key Takeaways Real name: -webkit-box-reflect (there is no standard box-reflect).
Syntax: direction, optional length, optional mask image.
Support: Chromium and Safari yes; Firefox no.
Use: progressive enhancement only — never required content.
One line: -webkit-box-reflect mirrors a box for decoration in WebKit and Chromium browsers.
Frequently Asked Questions What does CSS box-reflect do? It is the common name for -webkit-box-reflect, a non-standard property that draws a mirrored copy of an element above, below, left, or right.
Is box-reflect a standard CSS property? No. There is no unprefixed box-reflect in the CSS standard. Only -webkit-box-reflect exists, and it is not on the standards track.
Which browsers support -webkit-box-reflect? Chrome 4+, Safari 4+, Edge (Chromium), Opera, and Samsung Internet support it. Firefox does not. It is a browser style effect, not a Node.js feature.
What values can I use? A direction (above, below, left, or right), an optional length offset, and an optional mask image such as a linear-gradient that fades the reflection.
Should I use -webkit-box-reflect in production? Only as progressive enhancement. Keep the design readable without the reflection, and never use it to convey required information.
What is the initial value? none. Until you set a direction, no reflection is drawn.
About the author Developer, cloud engineer, and technical writer
I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.
8 people found this page helpful
Helpful Share Copy link Suggestion