CSS How to Add Shadows

Using CSS, we can add multiple types of shadows to HTML element to make the element looks more interactive and highlighted. To do this, here are the two properties we need to understand about:

For example:

HTML with CSS Code
<!DOCTYPE html>
      div{margin: 30px 10px; border: 1px solid; padding: 12px;}
      div.a{text-shadow: 4px 4px 10px red;}
      div.b{box-shadow: 4px 4px 10px blue;}

   <div class="a">text-shadow: 4px 4px 10px red</div>
   <div class="b">box-shadow: 4px 4px 10px blue</div>
text-shadow: 4px 4px 10px red
box-shadow: 4px 4px 10px blue

CSS Online Test

« Previous Tutorial Next Tutorial »

Follow/Like Us on Facebook

Subscribe Us on YouTube