Glass Edge is a wide, diffused CSS box shadow from the Inset & Pressed collection, built from 3 stacked layers with an inner (inset) shadow and a colored tint. The largest blur radius is 30px. Copy the code below and paste it into any element.
box-shadow: inset 0px 0px 0px 1px rgba(255, 255, 255, 0.3), inset 0px 1px 0px 0px rgba(255, 255, 255, 0.5), 0px 10px 30px -10px rgba(0, 0, 0, 0.25);
Shadow values
| # | Type | X | Y | Blur | Spread | Color | Opacity |
|---|---|---|---|---|---|---|---|
| 1 | inset | 0px | 0px | 0px | 1px | #FFFFFF | 0.3 |
| 2 | inset | 0px | 1px | 0px | 0px | #FFFFFF | 0.5 |
| 3 | outer | 0px | 10px | 30px | -10px | #000000 | 0.25 |
How to use it
.card {
background: #FFFFFF;
border-radius: 12px;
box-shadow: inset 0px 0px 0px 1px rgba(255, 255, 255, 0.3), inset 0px 1px 0px 0px rgba(255, 255, 255, 0.5), 0px 10px 30px -10px rgba(0, 0, 0, 0.25);
}
More Inset & Pressed examples
Frequently Asked Questions
Copy the box-shadow line and paste it into the CSS rule of the element you want to style, for example a card, button or image wrapper. The example is shown on a #F3F4F6 background with a #FFFFFF element and 12px rounded corners.
Yes. This shadow has 3 layers separated by commas. Change the pixel values or the rgba() color of any layer directly in your CSS to tune it.
This example is designed for light backgrounds. On very dark backgrounds a black shadow becomes hard to see, so raise the opacity or switch to a glow style.
