Sometimes, you want to add a shadow to an image to add depth and make it more attention-grabbing.
You probably already know about the box-shadow property, but it's not quite what you want. The box-shadow property adds a shadow to a box, but it doesn't add a shadow to complex images with transparency.
If you want to add a drop shadow to an image, you need to use the filter property instead.
How to add a drop shadow to an image
As mentioned before, we want to use the filter property to add a drop shadow to an image. The value of the property is called drop-shadow(), and inside it are the following parameters: