CSS box-reflect Property

Beginner
6 min read
Updated: Oct 2026
3 examples
Live preview

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 only

There is no unprefixed box-reflect. Use -webkit-box-reflect as progressive enhancement. Firefox does not support it.

CSS Syntax

syntax.css
-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).

Property Values

ValueDescriptionTry it
noneDefault. No reflectionTry it
belowMirror under the elementTry it
aboveMirror above the elementTry it
leftMirror to the leftTry it
rightMirror to the rightTry it
<length>Gap between the element and its reflection (e.g. 10px)Try it
<image>Mask for the reflection, often a gradient fadeTry it
initialResets to noneTry it
inheritTakes the parent valueTry it

How to Use -webkit-box-reflect

Pick a direction, then optionally add space and a fade mask.

  1. Set -webkit-box-reflect to a direction such as below.
  2. Add a length if you want a gap (for example below 12px).
  3. Add a mask image if you want a soft fade (for example a linear-gradient()).
  4. Leave room in the layout so the reflection is not clipped, and check the page in Firefox without the effect.
PieceRequired?Role
DirectionYesabove, below, left, or right
OffsetOptionalSpace between the original and the mirror
MaskOptionalFades or shapes the reflection (see also mask-image ideas)

Live Preview

Change only -webkit-box-reflect. Supporting browsers show a mirror; Firefox shows the card alone.

Decorative only. Unsupported browsers keep the original card with no mirror.

Reflection

Reflect

-webkit-box-reflect: below + fade

CSS Examples

Each snippet focuses on -webkit-box-reflect. Use Try It Yourself for a live editor.

Example 1 — Reflect Below

A simple mirror under the box.

CSS
<style>
  .box {
    -webkit-box-reflect: below;
  }
</style>

<div class="box">Reflect</div>
Try It Yourself

How It Works

  1. Use the real property name. Write -webkit-box-reflect, not an unprefixed box-reflect.
  2. Choose a direction. below places the mirror under the element.
  3. No offset yet. The reflection sits flush against the bottom edge.
  4. 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.

CSS
<style>
  .box {
    -webkit-box-reflect: below 12px;
  }
</style>

<div class="box">Reflect</div>
Try It Yourself

How It Works

  1. Keep the direction. Still below.
  2. Add a length. 12px is the gap between the card and the mirror.
  3. Order matters. Direction, then offset, then mask.
  4. 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.

CSS
<style>
  .box {
    -webkit-box-reflect: below 0 linear-gradient(transparent, white);
  }
</style>

<div class="box">Reflect</div>
Try It Yourself

How It Works

  1. Direction + offset + mask. below 0 keeps the gap at zero.
  2. Mask with a gradient. linear-gradient(transparent, white) fades the reflection.
  3. Opaque parts show. White in the mask keeps the mirror visible; transparent hides it.
  4. 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.

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.

70% approx. coverage
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.

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

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.
No. There is no unprefixed box-reflect in the CSS standard. Only -webkit-box-reflect exists, and it is not on the standards track.
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.
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.
Only as progressive enhancement. Keep the design readable without the reflection, and never use it to convey required information.
none. Until you set a direction, no reflection is drawn.

Next: box-shadow

Add depth with a fully standard shadow property.

box-shadow tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

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