How to Create 3D Product Reflections & Floor Shadows in CSS

The Quick Answer

To create glossy Apple-style 3D floor reflections, use -webkit-box-reflect: below 0 linear-gradient(to bottom, transparent 60%, rgba(255,255,255,0.25)) in WebKit/Blink browsers. For universal cross-browser support (including Firefox), render a pseudo-element clone with transform: scaleY(-1), position it beneath the product card, apply an alpha fade via mask-image, and anchor it with a flattened radial-gradient() contact shadow ellipse.

Interactive Demo Live Preview
3D Product Reflection Stage
3D PRODUCT
-webkit-box-reflect with Alpha Gradient Falloff

Step 1: The -webkit-box-reflect One-Liner (WebKit & Blink)

In Chromium and Safari browsers, the -webkit-box-reflect property generates a mirror reflection in a single line. It accepts a direction (below, above, left, right), an offset gap, and a gradient mask.

box-reflect.css
.product-card {
  /* Direction: below, Gap: 2px, Gradient fade */
  -webkit-box-reflect: below 2px linear-gradient(to bottom, transparent 50%, rgba(255, 255, 255, 0.3));
}

Step 2: Universal Cross-Browser Reflection with transform: scaleY(-1)

Because Firefox does not support -webkit-box-reflect, build a modern cross-browser fallback using a duplicate container or pseudo-element flipped vertically with transform: scaleY(-1) and faded using mask-image.

universal-reflection.css
.product-showcase {
  position: relative;
}

.product-reflection {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 50%;
  transform: scaleY(-1);
  opacity: 0.35;
  filter: blur(0.6px);
  mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
  pointer-events: none;
}

Step 3: Crafting the 3D Ground Contact Shadow Ellipse

A reflection alone looks ungrounded without a physical contact shadow. Position a flattened ellipse directly at the seam where the product meets the floor plane using CSS radial-gradient(ellipse, ...).

contact-shadow.css
.floor-contact-shadow {
  width: 90%;
  height: 12px;
  margin: 0 auto;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.75) 0%, transparent 75%);
  filter: blur(2px);
  transform: translateY(-6px);
}

Step 4: Interactive Hover Elevation & Dynamic Reflection Fade

When the user hovers over the card, lift the product upward with transform: translateY(-12px) while expanding the contact shadow blur and softening reflection opacity to simulate height off the ground.

elevation-physics.css
.product-showcase:hover .product-card {
  transform: translateY(-12px);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.product-showcase:hover .floor-contact-shadow {
  transform: translateY(0) scale(1.15);
  opacity: 0.5;
  filter: blur(6px);
  transition: all 0.3s ease;
}

Next-Level Addons: Elevating Your Implementation

Take this technique further by combining it with complementary design token studios and animation tools:

Reflection: Polished Floor 3D LIGHTING

1. Product Reflection & 3D Floor Shadow Generator

Explore in Reflection Studio →

Recreate the iconic Apple hardware showcase aesthetic. Combines CSS box-reflect with gradient masks and radial contact shadows.

Perspective 800px Reflected Plane Shifts with Tilt

2. 3D Parallax Tilt in Tilt Card Studio

Explore in Tilt Card Studio →

Combine 3D floor reflections with gyroscope and mouse-tracking perspective card tilts.

Specular Glint Light Sweep

3. Specular Sheen in Button Animations Studio

Explore in Button Animations Studio →

Add metallic starlight glints and sweeping light beams across reflected hardware surfaces.

Chaam
Chaam's Pro Tip

A trick I use in almost every project: don't fight specificity battles with !important. Leverage modern CSS cascade layers (@layer) and CSS variables as design tokens—it makes dark/light theme switching and responsive tuning effortless.

Why I Built the Product Reflection & 3D Floor Shadow Generator Studio

I got tired of guessing values and testing browser quirks in DevTools, so I built this tool to tweak and preview values in real time with 1-click code export.

Open in Product Reflection & 3D Floor Shadow Generator ↗

Frequently Asked Questions

Practical answers to common implementation questions, browser quirks, and performance tips.

Why does Firefox not support -webkit-box-reflect?

The Firefox team declined to implement `-webkit-box-reflect` because it was never ratified into the official W3C standard. Instead, Firefox adheres to the CSS Masking and CSS Transforms standards, which provide equivalent results via `transform: scaleY(-1)` and `mask-image`.

Can reflections be applied to text elements as well as images?

Yes! Both `-webkit-box-reflect` and the `scaleY(-1)` technique work on arbitrary HTML text headings, buttons, and card containers.

Why should I add a slight blur to the reflected layer?

Real-world polished surfaces (like treated wood, marble, or anodized aluminum) are not 100% perfect mirrors. Adding `filter: blur(0.5px)` or `1px` softens reflection edges and creates convincing physical realism.

How do I ensure the reflection does not block mouse clicks on links underneath?

Always apply `pointer-events: none;` to the reflected pseudo-element or container so user clicks pass right through to underlying elements.

Does creating a reflection duplicate video or canvas rendering load?

With `-webkit-box-reflect`, the browser reuses the existing GPU texture buffer without rendering a second video pipeline. With DOM duplication (`scaleY(-1)`), playing a second video does consume additional decoder resources.

← Back to all blog guides Launch Generator Studio →