Skip to main content
CSS-Tricks
  • Articles
  • Videos
  • Almanac
  • Newsletter
  • Guides
  • DigitalOcean
  • DO Community
Search

Articles Tagged
shadow

12 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 …

Avatar of Temani Afif
Temani Afif on Feb 10, 2023
Direct link to the article How to Make a Folder “Slit” Effect With CSS
blur shadow

How to Make a Folder “Slit” Effect With CSS

When you put something — say a regular sheet of paper — in a manilla folder, a part of that thing might peek out of the folder a little bit. The same sort of thing with a wallet and credit …

Avatar of Preethi
Preethi on Oct 19, 2022
Direct link to the article A Serene CSS Dappled Light Effect
emoji mix-blend-mode shadow

A Serene CSS Dappled Light Effect

There’s a serene warmth to the early evening sunlight peaking through rustling leaves. Artists use dappled light to create a soft, hypnotic effect.

Bedford Dwellings by Ron Donoughe (2013)

We can create the same sort of dappled light effect in …

Avatar of Preethi
Preethi on Jan 19, 2022
Direct link to the article Scroll Shadows With JavaScript
scrolling shadow

Scroll Shadows With JavaScript

Scroll shadows are when you can see a little inset shadow on elements if (and only if) you can scroll in that direction. It’s just good UX. You can actually pull it off in CSS, which I think is …

Avatar of Chris Coyier
Chris Coyier on Oct 5, 2021 (Updated on Jul 28, 2022)
Direct link to the article Designing Beautiful Shadows in CSS
shadow

Designing Beautiful Shadows in CSS

Direct Link

My favorite kind of blog post is when someone takes a subject that I’ve spent all of five minutes considering and then says—no!—this is an enormous topic worthy of a dissertation. Look at all the things you can do with …

Avatar of Robin Rendle
Shared by Robin Rendle on Sep 17, 2021
Direct link to the article Adding Shadows to SVG Icons With CSS and SVG Filters
drop-shadow filter shadow SVG svg filters

Adding Shadows to SVG Icons With CSS and SVG Filters

Why would we need to apply shadows to SVG?

  1. Shadows are a common design feature that can help elements, like icons, stand out. They could be persistent, or applied in different states (e.g. :hover, :focus, or :active)
…
Avatar of Joel Olawanle
Joel Olawanle on Jun 11, 2021
Direct link to the article Creating Colorful, Smart Shadows
background emoji shadow

Creating Colorful, Smart Shadows

Direct Link

A bona fide CSS trick from Kirupa Chinnathambi here. To match a colored shadow with the colors in the background-image of an element, you inherit the background in a pseudo-element, kick it behind the original, then blur and filter it. …

Avatar of Chris Coyier
Shared by Chris Coyier on May 4, 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.…

Avatar of Rob O'Leary
Rob O'Leary on Feb 22, 2021 (Updated on Jun 7, 2021)
Direct link to the article Simulating Drop Shadows with the CSS Paint API
css paint api houdini shadow

Simulating Drop Shadows with the CSS Paint API

Ask a hundred front-end developers, and most, if not all, of them will have used the box-shadow property in their careers. Shadows are enduringly popular, and can add an elegant, subtle effect if used properly. But shadows occupy a strange …

Avatar of Steve Fulghum
Steve Fulghum on Dec 29, 2020
Direct link to the article Breaking down CSS Box Shadow vs. Drop Shadow
box model filter shadow

Breaking down CSS Box Shadow vs. Drop Shadow

Drop shadows. Web designers have loved them for a long time to the extent that we used to fake them with PNG images before CSS Level 3 formally introduced them to the spec as the box-shadow property. I still reach …

Avatar of Geoff Graham
Geoff Graham on Oct 20, 2017 (Updated on Jan 27, 2023)
3d border-image shadow SVG

Slicing SVG 9 Ways

Direct Link

Paul Lewis animated a 3D Card Flip. Straightforward enough there, but this needed a shadow element as well:

The shadow may need to move around or fade, so we need a solution that we can animate with transforms & opacity,

…
Avatar of Chris Coyier
Shared by Chris Coyier on Sep 6, 2016
  • 1
  • 2
  • Older

CSS-Tricks is powered by DigitalOcean.

Keep up to date on web dev

with our hand-crafted newsletter

DigitalOcean
  • DigitalOcean
  • DigitalOcean Community
  • About DigitalOcean
  • Legal
  • Agency Coaching
  • Free Credit Offer
CSS-Tricks
  • Email
  • Guest Writing
  • Book
  • Advertising
Follow
  • Mastodon
  • Twitter
  • Instagram
  • YouTube
  • CodePen
  • iTunes
  • RSS
Back to Top