CSS Box Shadow Generator
Design beautiful box shadows with multiple layers. All processing happens in your browser.
CSS
box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.25);#1e1e24
#0f0f11
Layer 1
X0px
Y4px
Blur12px
Spread0px
Opacity25%
Frequently Asked Questions
What is a CSS box shadow?▾
A CSS box shadow adds a shadow effect around an element's frame. It is defined using the box-shadow property with values for horizontal offset, vertical offset, blur radius, spread radius, and color. Box shadows can make elements appear elevated or add depth to a design.
How do I add multiple box shadows in CSS?▾
Separate multiple shadow values with commas. For example: box-shadow: 0 2px 4px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.1); — this creates a subtle layered shadow that looks more realistic than a single shadow. This tool lets you add and configure multiple layers visually.
What is an inset box shadow?▾
An inset box shadow appears inside the element instead of outside. Add the 'inset' keyword before the shadow values: box-shadow: inset 0 2px 4px rgba(0,0,0,0.2). Inset shadows are often used to create pressed or recessed effects on buttons and input fields.
What is the spread radius in box-shadow?▾
The spread radius is the fourth numeric value in box-shadow. A positive value expands the shadow larger than the element, while a negative value shrinks it. For example, box-shadow: 0 4px 8px -2px rgba(0,0,0,0.2) uses a negative spread to make the shadow slightly smaller than the element.
Do box shadows affect page performance?▾
Box shadows can impact rendering performance, especially with large blur values or when applied to many elements. For best performance, avoid very large blur radii (over 50px) and limit the number of shadowed elements in scrollable areas. Using will-change: transform can help the browser optimize rendering.
Related Articles
How to Create Perfect Box Shadows in CSS
Learn the art of realistic shadows: layered shadows, colored shadows, and performance tips for smooth UI design.
CSS Flexbox Cheat Sheet: The Only Guide You Need
A practical CSS Flexbox reference with visual examples. Master justify-content, align-items, flex-wrap, gap, and more.