Skip to main content
CSS-Tricks
  • Articles
  • Notes
  • Links
  • Guides
  • Almanac
  • Picks
  • Shuffle
Search

Articles Tagged
box-shadow

8 Articles
{
,

}
Direct link to the article Different Ways to Get CSS Gradient Shadows
box-shadow gradients shadow

Different Ways to Get CSS Gradient Shadows

It’s a question I hear asked quite often: Is it possible to create shadows from gradients instead of solid colors? There is no specific CSS property that does this (believe me, I’ve looked) and any blog post you find about …

Temani Afif on Feb 10, 2023
Direct link to the article Shadow Palette Generator
box-shadow

Shadow Palette Generator

Josh’s Shadow Palette Generator is a fantastic tool. The premise is that box-shadow pretty much always looks better when there are multiple layered shadows that are a bit tinted. It reminds me of how gradients almost always look better when …

Chris Coyier on Dec 13, 2021
Direct link to the article Getting Deep Into Shadows
box-shadow drop-shadow filter shadow text-shadow

Getting Deep Into Shadows

Let’s talk shadows in web design. Shadows add texture, perspective, and emphasize the dimensions of objects. In web design, using light and shadow can add physical realism and can be used to make rich, tactile interfaces.…

Rob O'Leary on Jun 7, 2021
Direct link to the article Make a smooth shadow, friend.
box-shadow

Make a smooth shadow, friend.

One box-shadow is cool and all, but check out Philipp Brumm’s tool for building out comma-separated multiple box-shadows, which result in a much smoother and more natural look.

This reminds me very much of the idea for easing linear-gradient. …

Chris Coyier on Dec 19, 2019
Direct link to the article Drawing Realistic Clouds with SVG and CSS
box-shadow svg filters

Drawing Realistic Clouds with SVG and CSS

Greek mythology tells the story of Zeus creating the cloud nymph, Nephele. Like other Greek myths, this tale gets pretty bizarre and X-rated. Here’s a very abridged, polite version.

Nephele, we are told, was created by Zeus in the …

Beau Jackson on Jun 26, 2019
Direct link to the article Using “box shadows” and clip-path together
box-shadow clip-path filter

Using “box shadows” and clip-path together

Let’s do a little step-by-step of a situation where you can’t quite do what seems to make sense, but you can still get it done with CSS trickery. In this case, it’ll be applying a shadow to a shape.…

Chris Coyier on Apr 10, 2019
Direct link to the article box-shadow
box-shadow

box-shadow

The box-shadow property in CSS is for putting shadows on elements (sometimes referred to as “drop shadows”, ala Photoshop/Figma).

.card {
  box-shadow: 0 3px 10px rgb(0 0 0 / 0.2);
}

That syntax is:

box-shadow: [horizontal offset] [vertical offset] [blur 
…
Sara Cope on Sep 22, 2022
Direct link to the article Top Shadow
box-shadow shadow

Top Shadow

Shadow along the top edge of the website, like this:

body::before {
  content: "";
  position: fixed;
  top: -10px;
  left: 0;
  width: 100%;
  height: 10px;
  box-shadow: 0px 0 10px rgba(0, 0, 0, 0.8);
  z-index: 100;
}
…
Chris Coyier on Sep 12, 2019

CSS-Tricks is powered by DigitalOcean.

Keep up to date on web dev

with our hand-crafted newsletter

DigitalOcean
  • About DO
  • Cloudways
  • Legal stuff
  • Get free credit!
CSS-Tricks
  • Contact
  • Write for CSS-Tricks!
  • Advertise with us
Social
  • RSS Feeds
  • CodePen
  • Mastodon
  • Bluesky
Back to Top