Create drop shadow with plain CSS3 - HTML CSS CSS Property

HTML CSS examples for CSS Property:box-shadow

Description

Create drop shadow with plain CSS3

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">
body {<!--from  w  ww  .j av a 2 s  .  c om-->
   background:Chartreuse;
}

.boxwrap {
   width:351px;
   height:366px;
   position:relative;
}

.box {
   width:351px;
   height:351px;
   background:yellow;
}

.box:after {
   width:351px;
   height:51px;
   bottom:27px;
   display:block;
   position:absolute;
   content:" ";
   z-index:-2;
   box-shadow:0px 20px 9px -6px blue;
}
</style> 
 </head> 
 <body> 
  <div class="boxwrap"> 
   <div class="box">
     Lorem ips 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials