What is CSS Text Shadow?
The text-shadow CSS property adds shadow effects behind text characters. By layering multiple shadows, you can create neon glow effects, 3D extrusion, letterpress, retro, and embossed text styles.
Unlike box-shadow, text-shadow applies to the text shape itself (not the element box), has no spread radius, and cannot be inset. Each shadow takes: offset-x offset-y blur color.
Popular Text Shadow Effects
Here are popular effects you can create with this generator:
- Simple drop shadow:
text-shadow: 2px 2px 4px rgba(0,0,0,0.3) - Neon glow:
text-shadow: 0 0 10px #7c3aed, 0 0 30px #7c3aed - 3D extrusion: Multiple 1px shadows in one direction with graduated colors
- Letterpress: Subtle light shadow above dark text
- Retro outline: Multiple shadows at each diagonal direction
Frequently Asked Questions
CSS text-shadow adds shadow effects behind text characters. The syntax is: text-shadow: offset-x offset-y blur-radius color. Multiple shadows are separated by commas. It applies to all text in the element including pseudo-elements. No spread-radius or inset option is available.
Layer multiple shadows with zero offset and increasing blur radii: text-shadow: 0 0 5px #7c3aed, 0 0 15px #7c3aed, 0 0 30px #7c3aed, 0 0 50px #7c3aed. Works best on dark backgrounds with bright, saturated colors. Add the same color multiple times for stronger intensity.
Stack multiple shadows 1px apart in the same direction, each slightly darker: text-shadow: 1px 1px 0 #888, 2px 2px 0 #777, 3px 3px 0 #666, 4px 4px 0 #555. The last shadow can include a soft blur for realism. Longer shadows (8-12px) create more dramatic 3D depth.
Yes! text-shadow is animatable with CSS transitions and keyframes. Example: transition: text-shadow 0.3s ease. Animate from a subtle shadow to a bright glow on hover. For performance, use will-change: text-shadow on frequently animated elements.
text-shadow has universal support in all modern browsers — Chrome, Firefox, Safari, Edge, Opera, and all mobile browsers — without any vendor prefixes. It is safe to use without fallbacks, though older IE versions (8 and below) did not support it.