Building the mirrored copy
A reflection is a stylized mirror image of an object. The standard way to generate one in CSS would be the element() function, but it is still experimental and, at the time of writing, only supported in Firefox. So the practical approach is to place two identical designs in the markup and use the second one as the reflection. That duplication can be handled with JavaScript or pseudo-elements, but the demos here simply pair identical elements.
.units > * {
background-image: url('image.jpeg');
background-clip: text;
color: transparent;
/* etc. */
}
Creating the reflection from text
The original graphic uses knock-out text: a background image behind transparent text color, with background-clip set to its text value. The bottom element of the pair is flipped upside-down and pulled closer to the original with transform.
.units > :last-child {
transform: rotatex(180deg) translatey(15px);
}
Fading the copy out
Gradients do the visual work on the upturned element. A linear gradient used as a mask layer produces a gradual fade. Since mask-mode defaults to alpha, the transparent areas of the image make the matching areas of the element transparent too; a gradient that goes transparent at the top therefore fades the reflection away at its far end.
.units > :last-child {
transform: rotatex(180deg) translatey(15px);
mask-image: linear-gradient(transparent 50%, white 90%);
}
Other gradient styles work as well, on their own or combined. A striped pattern can sit alongside the fade, for instance, or a radial-gradient can replace the linear one.
.units > :last-child {
/* ... */
mask-image:
repeating-linear-gradient(transparent, transparent 3px, white 3px, white 4px),
linear-gradient( transparent 50%, white 90%);
}
.units > :last-child {
/* ... */
mask-image: radial-gradient(circle at center, white, transparent 50%);
}
Shaping and softening
Adding skew() to the transform property morphs the mirror image and lends it some movement. When the reflection should read more like a shadow, blurring, brightening or lowering its opacity tones it down.
.units > :last-child {
/* ... */
transform: rotatex(180deg) translatey(15px) skew(135deg) translatex(30px);
}
.units > :last-child {
/* ... */
filter: blur(4px) brightness(1.5);
}
A reflection can carry its own shadowy quality. Rather than reusing the background image or a solid text color, the reflection can be given a series of translucent red, blue and green shadows chosen to complement the original design. The rgb() values used there may look unfamiliar; they come from a newer CSS color syntax. All the approaches can be combined in a single demo.
.units > :last-child {
/* ... */
text-shadow:
0 0 8px rgb(255 0 0 / .4),
-2px -2px 6px rgb(0 255 0 / .4),
2px 2px 4px rgb(0 255 255 / .4);
}
What makes a reflection convincing
The effects applied to a reflection should be subtler than those on the main object, yet noticeable enough to register. Color, direction and shape of the reflection all matter too. While the examples here work with text, the technique suits any striking design element that has enough breathing room around it to benefit from a reflection.



