CSS Box Shadow Generator
Visually generate CSS box-shadow with live preview — multiple layers, colors, inset support.
How to use CSS Box Shadow Generator
Frequently Asked Questions
What do the four box-shadow values mean?
The box-shadow syntax is: box-shadow: [horizontal-offset] [vertical-offset] [blur-radius] [spread-radius] [color]. Example: box-shadow: 4px 8px 16px 0px rgba(0,0,0,0.2). Horizontal offset moves shadow left/right, vertical moves up/down, blur makes it soft, spread expands or contracts it, and color sets the shadow color including opacity via RGBA.
What is an inset box shadow?
Adding the "inset" keyword places the shadow inside the element rather than outside. Outer shadows make elements appear elevated above the page. Inset shadows make elements appear recessed into the page — used for pressed button states, input field focus indicators, inner glow effects, and concave or sunken panel styles. The same x/y/blur/spread parameters apply but their direction flips.
How do I create a realistic card shadow?
Realistic card shadows use two layers: a close, crisp shadow for the contact shadow (0 1px 3px rgba(0,0,0,0.12)) and a diffuse ambient shadow (0 8px 24px rgba(0,0,0,0.08)). Use dark colors with low opacity rather than solid black. Shadows in the real world are slightly blueish-grey — try rgba(0,0,20,0.15) for a more natural tone than pure black.
Can I add multiple shadows in CSS?
Yes. Separate multiple shadows with commas: box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 4px 16px rgba(0,0,0,0.08). Shadows render in the order listed — first shadow is on top. Multiple shadows let you combine a sharp near-shadow with a soft far-shadow for physically realistic depth. Use the "Add Layer" button in the generator to stack shadows visually.
What is the difference between box-shadow and text-shadow?
box-shadow applies to the box (border-box) of an HTML element — the rectangular area including padding and border. text-shadow applies to the letterforms of text content only. For card and container effects, use box-shadow. For headline effects, glows, or embossed text looks, use text-shadow. The CSS generator here focuses on box-shadow; text-shadow uses only x-offset, y-offset, blur, and color (no spread).
Recommended
Related Tools
Color Picker & Converter
Pick colors and convert between HEX, RGB, RGBA, HSL, HSV, CMYK and CSS color formats instantly.
Color Palette Generator
Generate beautiful color palettes — complementary, triadic, analogous, monochromatic, and more.
CSS Generator
Generate CSS for gradients, shadows, borders, and animations with a live preview.