No Login Data Private Local Save

CSS Inset Box Shadow Generator - Online Inner Depth

7
0
0
0

CSS Inset Box Shadow Generator

Create beautiful inner shadows & depth effects with live preview. Generate clean CSS instantly.

px
px
px
px

Inset: positive spread shrinks shadow inward, negative expands it.

#000000
25%
Preview BG:
Shape:
box-shadow: inset 3px 3px 8px 0px rgba(0, 0, 0, 0.25);

Frequently Asked Questions

What is CSS inset box-shadow?
The inset keyword in CSS box-shadow places the shadow inside the element instead of outside. This creates a sense of depth, as if the element is carved into the page. It's widely used for pressed buttons, input fields, wells, and embossed effects. The syntax is: box-shadow: inset [offset-x] [offset-y] [blur] [spread] [color];
How does spread-radius behave differently with inset?
With inset, positive spread shrinks the shadow inward from the edges (making the shadow smaller), while negative spread expands it outward toward the center. This is the opposite of regular outset shadows. For example, inset 0 0 10px 5px rgba(0,0,0,0.3) creates a shadow that's pulled 5px inward from all edges.
Can I layer multiple inset shadows on one element?
Absolutely! You can combine multiple inset shadows (and even mix inset with outset) by separating them with commas. This tool supports up to 5 layers of inset shadows. Multi-layer shadows are great for complex lighting effects like bevels, embossing, and realistic depth. Example: box-shadow: inset 2px 2px 5px rgba(0,0,0,0.2), inset -2px -2px 5px rgba(255,255,255,0.1);
What's the difference between inset shadow and an inner glow?
An inner glow is essentially an inset shadow with offset-x and offset-y set to 0, a large blur radius, and a positive spread. This creates a uniform shadow radiating evenly from all edges inward. Use the "Inner Glow" preset in this tool to see it in action. Inner glows are popular for focus states on form elements.
How do I create a pressed/inset button effect?
For a pressed button effect, use a subtle inset shadow with a small downward offset (positive Y) and moderate blur. Try these settings: inset 1px 3px 6px rgba(0,0,0,0.2). Combine with a slightly darker background for maximum realism. The "Subtle Dip" and "Deep Cavity" presets demonstrate this technique.
Are inset box-shadows supported in all browsers?
Yes, inset box-shadow has excellent browser support. It works in all modern browsers including Chrome, Firefox, Safari, and Edge, as well as IE9+. The box-shadow property (including inset) is part of the CSS3 specification and is safe to use in production without vendor prefixes.
Do inset shadows affect element layout or size?
No. Like all box-shadow values, inset shadows are purely visual and do not affect the element's layout, size, or the flow of surrounding content. They render on top of the background but beneath the content. This makes them safe for interactive elements without worrying about layout shifts.
How do inset shadows perform on mobile devices?
Inset shadows are GPU-accelerated in most modern mobile browsers and perform very well. However, large blur radii (100px+) combined with multiple layers may cause slight rendering delays on lower-end devices. For optimal performance, limit blur to under 80px and keep layers to 3 or fewer on performance-critical elements.
Can I animate inset box-shadows?
Yes! You can smoothly transition or animate inset box-shadows using CSS transition or @keyframes. However, animating box-shadow triggers repaints and can be less performant than transform or opacity animations. For hover effects, keep shadow transitions short (150-300ms) for the best experience.