CSS Box Shadow Generator
This tool writes a CSS box-shadow from offset, blur, spread, colour and opacity. It can add an inner shadow or a second soft layer, and shows a preview.
- Free, no sign-up
- Nothing is sent to a server
- Worldwide
How to use CSS Box Shadow Generator online
- Set the offsets and blur. And the spread.
- Pick colour and opacity. Low opacity looks natural.
- Choose inset or a second layer. If you want them.
- Copy the CSS. Paste it into your stylesheet.
Why use this free CSS Box Shadow Generator
- Offset, blur and spread
- Colour with opacity
- Inset shadows
- Second soft layer
- Old prefix option
- Live preview
What box-shadow does
The box-shadow property draws a shadow around an element, such as a card, a button or a picture. It does not change the size or layout of the element. This tool turns the numbers you set into the value, so you can copy one line of CSS instead of guessing the order of the parts.
The numbers
The first two numbers move the shadow: a positive horizontal offset pushes it right and a positive vertical offset pushes it down. Blur softens the edge, and zero gives a hard edge. Spread makes the shadow bigger or, if negative, smaller than the element. The colour with its opacity sets how strong it looks, and a low opacity looks more natural than a solid black.
Inset and layers
The inset option draws the shadow inside the element, which looks like a pressed or hollow surface. The second soft layer adds a smaller, lighter shadow close to the element, which together with the main shadow gives a more natural depth. Layered shadows are separated by commas in the value.
What the preview shows
The preview draws a white card on a light background with the offset, blur and colour you set. It does not draw spread or inset shadows, and a note tells you when that applies. Browsers draw blur a little differently from the preview, so test the code in your page, on the real background, before you rely on it.
Good habits
Use soft, low-opacity shadows for most interfaces, and keep one direction of light across the page, so that all shadows fall the same way. Large blur values on many elements can slow scrolling on weak phones. The old -webkit- form is only needed for very old browsers, and is offered as an option.
Using the tool
There is no button to wait for: the CSS Box Shadow Generator result follows every change. Press Try a sample to see how it behaves.
CSS Box Shadow Generator: frequently asked questions
What order are the values in?
Can I use several shadows?
Why is my inset shadow not in the preview?
What does spread do?
Which colour formats work?
Where does my text go when I use the CSS Box Shadow Generator?
Is there a way to reuse the CSS Box Shadow Generator result?
Related searches for CSS Box Shadow Generator
- CSS Box Shadow Generator online
- free CSS Box Shadow Generator
- CSS Box Shadow Generator online free
- CSS Box Shadow Generator for mobile
- CSS Box Shadow Generator without sign up
- CSS Box Shadow Generator – Developer & Web Tools
CSS Box Shadow Generator is a free online tool on MAITBOX, in the Developer & Web Tools group. It runs in your browser, so what you type is not sent to a server. It works on Android and iPhone, and on Windows, Mac and Linux, with no download and no account.