Box-shadow only on div corners - HTML CSS CSS Property

HTML CSS examples for CSS Property:box-shadow

Description

Box-shadow only on div corners

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
.box h3 {<!--from w w w.jav a  2 s  .com-->
   text-align:center;
   position:relative;
   top:81px;
}

.box {
   width:71%;
   height:201px;
   background:Chartreuse;
   margin:41px auto;
}

.effect2
 {
   position:relative;
}

.effect2:before, .effect2:after
 {
   z-index:-2;
   position:absolute;
   content:"";
   bottom:16px;
   left:11px;
   width:51%;
   top:81%;
   max-width:301px;
   background:yellow;
   -webkit-box-shadow:0 16px 11px blue;
   -moz-box-shadow:0 16px 11px pink;
   box-shadow:0 16px 11px OrangeRed;
   -webkit-transform:rotate(-4deg);
   -moz-transform:rotate(-4deg);
   -o-transform:rotate(-4deg);
   -ms-transform:rotate(-4deg);
   transform:rotate(-4deg);
}

.effect2:after
 {
   -webkit-transform:rotate(4deg);
   -moz-transform:rotate(4deg);
   -o-transform:rotate(4deg);
   -ms-transform:rotate(4deg);
   transform:rotate(4deg);
   right:11px;
   left:auto;
}
</style> 
 </head> 
 <body> 
  <div class="box effect2"> 
   <h3>Lorem ip</h3> 
  </div>  
 </body>
</html>

Related Tutorials