The box-reflect property creates a mirror-like reflection of an element. It is a WebKit-only visual effect — useful for decorative layouts, but not a standard CSS feature you should depend on everywhere.
01
Reflections
Mirror an element visually.
02
Syntax
Direction, offset, mask.
03
Directions
above, below, left, right.
04
Gradient Mask
Fade reflections smoothly.
05
WebKit Prefix
Use -webkit-box-reflect.
06
Fallbacks
Design without reflections.
Fundamentals
Definition and Usage
The box-reflect CSS property lets you create a reflection of an element, similar to a mirror image. In practice, you write it as the vendor-prefixed property -webkit-box-reflect because there is no widely supported standard version.
This property is primarily supported in WebKit-based browsers such as Safari and some Chromium builds. It can create visually appealing effects by reflecting the content of an element — images, cards, logos, and headings are common targets.
💡
Beginner Tip
Treat reflections as optional decoration. Your layout and content should still look complete in browsers that ignore -webkit-box-reflect.
Foundation
📝 Syntax
The syntax for box-reflect includes a direction, an optional offset, and an optional mask:
Always use the -webkit- prefix — there is no reliable unprefixed version.
Direction is required: above, below, left, or right.
Offset is optional spacing between the element and its reflection (e.g. 10px).
Mask is optional — usually a gradient that fades the reflection out.
There is no default reflection; you must set the property explicitly on each element.
Cheat Sheet
⚡ Quick Reference
Question
Answer
Standard property?
No — WebKit vendor feature
Property name in CSS
-webkit-box-reflect
Default value
None (no reflection unless set)
Inherited
No
Common use
Decorative image, logo, and card reflections
Reference
💎 Property Values
The -webkit-box-reflect value is made up of three parts: direction, offset, and an optional mask.
Part
Example
Meaning
direction
below
Places the reflection below the element. Also: above, left, right.
offset
10px
Gap between the element and its reflection. Accepts any valid CSS length.
mask
linear-gradient(transparent, white)
Optional gradient or image that fades or shapes the reflection.
abovebelowleftright
0px10px1em
Options
Reflection Directions
The direction keyword controls where the mirrored copy appears relative to the original element:
below — Most common. The reflection appears under the element, like a floor mirror.
above — The reflection appears above the element.
left — The reflection appears to the left side.
right — The reflection appears to the right side.
Combine a direction with an offset to add breathing room between the element and its reflection. Add a gradient mask to fade the reflection smoothly instead of showing a hard mirrored edge.
Preview
👀 Live Preview
This card uses -webkit-box-reflect: below 8px with a gradient mask. The effect appears in supporting WebKit browsers.
Reflect me
If you do not see a reflection, your browser may not support -webkit-box-reflect. The card above still displays normally — that is expected fallback behavior.
Hands-On
Examples Gallery
Try basic reflections, gradient masks, different directions, and card-style effects.
🖼 Basic Reflections
Start with a simple below reflection and a small offset — the same pattern from the reference example.
Example 1 — Image Reflection Below
Create a reflection of an image below the element with a 10px offset.
The gradient mask controls opacity across the reflection. The top of the reflection stays subtle, then it fades out — a common technique for logo and cover-flow-style effects.
Example 3 — Reflection Above the Element
Change the direction keyword to place the mirror image on the other side.
The card’s shadow, border-radius, and content are all reflected together. The gradient mask keeps the effect subtle so the layout still feels professional.
Compatibility
Fallback Strategy
Because -webkit-box-reflect is not widely supported, plan your design so it works without reflections:
Keep content readable — Do not place important text only in the reflection area.
Add bottom spacing carefully — Reflections extend the visual footprint; unsupported browsers will not need that extra space.
Use as enhancement — The element should look complete with or without the mirror effect.
Consider alternatives — For broader support, duplicate content with transform: scaleY(-1) and opacity in supporting layouts, or use SVG filters.
🧠 How box-reflect Works
1
You style an element normally
The original element renders with its usual background, border, image, or text content.
Base element
2
You add -webkit-box-reflect
Set a direction, optional offset, and optional gradient mask to control the mirrored copy.
CSS rule
3
WebKit draws the reflection
Supporting browsers flip the element’s appearance and place it on the chosen side, applying the mask if provided.
Rendering
=
🔮
Mirror-like visual effect
A decorative reflection appears in supporting browsers; other browsers show only the original element.
Compatibility
Limited Browser Support
The box-reflect property is non-standard and only supported in WebKit-based browsers such as Safari and some Chromium builds. It is not supported in Firefox or Edge. Use it with caution and always provide fallback styles.
⚠ Non-standard · WebKit only
Decorative effect — not a baseline CSS feature
Treat -webkit-box-reflect as progressive enhancement. Test your design in browsers that do not support it to ensure the page still works well.
38%WebKit browser support
Apple Safari4+ · macOS & iOS
Supported
Google Chrome4+ · WebKit engine era
Partial / legacy
Mozilla FirefoxAll versions
Not supported
Microsoft EdgeChromium & Legacy
Not supported
OperaModern versions
Not supported
Fallback behavior
When unsupported, the element renders normally with no reflection — which is the correct graceful degradation.
💻
All unsupported browsersReflection ignored · Original element unchanged
Safe
box-reflect property38% supported
Bottom line: Use -webkit-box-reflect only for optional decoration. Never make reflections essential to your layout or content.
Wrap Up
Conclusion
The box-reflect property can add a unique visual effect to your web elements by creating mirror-like reflections. However, due to its limited browser support, it should be used sparingly and with appropriate fallbacks.
Experiment with different directions, offsets, and gradient masks to achieve the desired effect. Always verify that your design still looks good when the reflection is not rendered.
Use -webkit-box-reflect for optional decorative polish
Add a gradient mask to fade reflections naturally
Leave space around elements for the reflection to display
Test in Safari and in browsers without support
Keep the original element fully readable on its own
❌ Don’t
Rely on reflections for critical UI or information
Assume Chrome or Edge will always show the effect
Forget that this is a non-standard property
Use heavy reflections on long text blocks — it reduces readability
Skip fallback testing before shipping to production
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about box-reflect
Use these points before adding mirror effects to your pages.
5
Core concepts
🔮01
Mirror Effect
Flips element visually.
Purpose
⚠02
Non-Standard
WebKit vendor feature.
Status
🗼03
Direction
above, below, left, right.
Syntax
🎨04
Gradient Mask
Fades the reflection.
Effect
🛡05
Fallback First
Design without it.
Safety
❓ Frequently Asked Questions
box-reflect creates a mirror-like reflection of an element. It is implemented as the vendor-prefixed property -webkit-box-reflect and draws a flipped copy of the element in a chosen direction.
No. box-reflect is a non-standard WebKit feature. There is no unprefixed standard version in the CSS specification, so you should treat it as progressive enhancement only.
It works in WebKit-based browsers such as Safari and some Chromium builds. Firefox and most non-WebKit browsers do not support it, so always provide a fallback design.
The syntax is direction, optional offset, and optional mask. Direction can be above, below, left, or right. Offset is a length like 10px. Mask is usually a gradient that fades the reflection.
Use it sparingly for decorative effects where missing reflections will not break the layout. Never rely on reflections to communicate important information, and test without the effect to ensure the page still looks good.