How to Create CSS Box Shadows (Beginner Guide + Generator)
The CSS box-shadow property allows you to add shadow effects around elements such as cards, buttons or images. Shadows help create depth and improve the visual hierarchy of a layout.
In this guide you will learn how CSS box-shadow works
and how you can generate custom shadows instantly using our tool.
What is CSS box-shadow?
The box-shadow property adds shadow effects around
the frame of an HTML element. It accepts values for horizontal
offset, vertical offset, blur radius, spread radius and color.
Example of CSS box-shadow
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
This shadow moves 10px down, adds blur and creates a soft realistic effect often used in modern UI design.
Create your own shadow
You can quickly generate custom shadows using our tool:
Tips for better shadows
- Use soft blur values for modern UI.
- Avoid very dark shadows.
- Combine multiple shadows for depth.
FAQ
What does box-shadow do in CSS?
It adds shadow effects around HTML elements.
Can I use multiple shadows?
Yes, you can combine multiple shadows separated by commas.