Why are there two ways to make shadows in CSS? box-shadow vs filter: drop-shadow()

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

Sign in to save videos and track what you’ve finished.

BeginnerUI10 min

About this video

Explains the difference between CSS box-shadow and filter: drop-shadow() for creating shadows on web elements. It compares how each behaves, including how drop-shadow follows the shape of transparent images.

What you’ll learn

  • Create a shadow on a box with box-shadow
  • Apply filter: drop-shadow() to follow an image's transparent shape
  • Choose between box-shadow and drop-shadow for a given element