Add a blur effect to the shadow with CSS



To add a blur effect to the shadow, use the box-shadow property.

You can try to run the following code to add blur effect

Example

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <style>
         h2 {
            box-shadow: 10px 10px 7px green;
            height: 50px;
            background-color: yellow;
         }
      </style>
   </head>
   <body>
      <h2>Heading Two</h2>
      <p>Above heading has shadow.<p>
   </body>
</html>
Updated on: 2020-06-23T15:47:46+05:30

1K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements