Adding Drop Shadow to Images using CSS3

To add drop shadow to image in CSS3, use the drop-shadow value for filter property. It has the following values −

h-shadow – To specify a pixel value for the horizontal shadow.

v-shadow – To specify a pixel value for the vertical shadow. Negative values place the shadow above the image.

blur – To add a blur effect to the shadow.

spread - Positive values causes the shadow to expand and negative to shrink.

color – To add color to the shadow


 Live Demo

<!DOCTYPE html>
img.demo {
   filter: brightness(120%);
   filter: contrast(120%);
   filter: drop-shadow(10px 10px 10px green);
<h1>Learn MySQL</h1>
<img src="" alt="MySQL" width="160" height="150">
<h1>Learn MySQL</h1>
<img class="demo" src="" alt="MySQL" width="160" height="150">