Generate CSS box-shadow with live preview.
A CSS box-shadow is a styling property that adds shadowing effects around an element's frame. It allows developers to create the illusion of depth, making elements appear raised or sunken into the page.
To create an inner shadow, you simply need to include the 'inset' keyword in your CSS box-shadow property. Our generator includes a simple toggle button that automatically adds this keyword to your generated code.
You can layer multiple shadows by separating each shadow definition with a comma inside the CSS property. Our tool allows you to stack and customize multiple layers visually before copying the complete code.
A box shadow might not show if the element has an overflow property set to hidden, or if the z-index of overlapping elements is hiding it. Additionally, setting the blur and spread to zero with a zero offset will make the shadow invisible.
The standard syntax follows the order: offset-x, offset-y, blur-radius, spread-radius, and color. For example, 'box-shadow: 2px 4px 10px 0px rgba(0,0,0,0.5);' applies a semi-transparent, slightly blurred drop shadow.