Generador de box-shadow CSS gratuito
El generador de sombras de caja te ayuda a crear la sombra box-shadow CSS perfecta con vista previa en vivo. Ajusta desplazamiento, desenfoque, propagación, color e inset, y copia el CSS listo para usar.
Shadow work sits alongside the CSS Border Radius Generator and the Glassmorphism CSS Generator, which combine the same properties. To check the contrast of the shadowed surface, the Color Contrast Checker is the verification step.
Cómo usar Sombra de caja
- 1 Set the horizontal and vertical offsets with the sliders, or type exact values.
- 2 Adjust the blur radius. A larger blur softens the edge; the spread value expands or contracts the shadow before blurring.
- 3 Pick a colour and reduce the opacity — a shadow at full opacity looks like a second element rather than a shadow.
- 4 Copy the generated `box-shadow` declaration, or add layered shadows for a more realistic result.
Cómo usarlo
Mueve los controles y elige un color para ver la vista previa en vivo. El CSS generado se actualiza al instante: cópialo directamente en tu hoja de estilos.
- La vista previa refleja cada cambio
- Activa la opción inset para sombras interiores
- Copia el CSS exacto con un solo clic
Preguntas frecuentes
What does the spread value do?
It expands or contracts the shadow's shape before the blur is applied. A positive spread makes the shadow larger than the element in every direction; a negative spread shrinks it. Negative spread with a large blur is how you produce a shadow that appears only at the bottom, rather than one bleeding out on all sides.
How do I make a shadow look realistic rather than like a grey box?
Use several layered shadows with increasing blur and decreasing opacity, and offset them downward more than sideways. Real light comes from above, so a shadow cast by ambient light is soft and wide directly below the object, with a tighter darker one close to the edge. A single hard shadow with a large offset reads as artificial.
Do shadows hurt performance?
A large blurred shadow is genuinely expensive to composite, more so than most people assume, and it is worse on elements that animate. Animating a shadow forces a repaint each frame. The common workaround is to render the shadow on a pseudo-element and animate its opacity instead, which the compositor can handle.
Herramientas para desarrolladores relacionadas
También te puede interesar
Herramientas de otras categorías que suelen combinarse con Sombra de caja: