CSS Box Shadow



The CSS box-shadow property is used to add shadow effects to elements. The following is an example to add a box shadow

Example

Live Demo

<html>
   <head>
      <style>
         div {
            width: 300px;
            height: 100px;
            padding: 15px;
            background-color: red;
            box-shadow: 10px 10px;
         }
      </style>
   </head>
   <body>
      <div>This is a div element with a box-shadow</div>
   </body>
</html>

Output


Advertisements