Using a box shadow on a div - HTML CSS CSS Property

HTML CSS examples for CSS Property:box-shadow

Description

Using a box shadow on a div

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">
.overlayme input {
   background-color:Chartreuse;
}

.overlayme {<!--from  ww  w .j a v a  2 s.  c  o m-->
   max-width:251px;
   margin:0 auto;
   margin:21px;
   padding:21px;
   border-radius:21px;
   overflow:hidden;
   box-shadow:0 5px 13px yellow, 0 0 0 10001px rgba(0, 0, 0, 0.4);
   position:relative;
   background:white;
}

input {
   background-color:blue;
}

.fixer {
   width:100%;
   height:100%;
   left:0;
   top:0;
   position:absolute;
}
</style> 
 </head> 
 <body> 
  <input type="button" value="click me first"> &nbsp; 
  <input type="button" value="now tab to me"> &nbsp; 
  <input type="button" value="now tab to me"> &nbsp; 
  <input type="button" value="now tab to me"> 
  <br> &nbsp; 
  <br> 
  <input type="button" value="now tab to me"> &nbsp; 
  <input type="button" value="now tab to me"> &nbsp; 
  <input type="button" value="now tab to me"> &nbsp; 
  <input type="button" value="now tab to me"> 
  <br> &nbsp; 
  <br> 
  <input type="button" value="now tab to me"> &nbsp; 
  <input type="button" value="now tab to me"> &nbsp; 
  <input type="button" value="now tab to me"> &nbsp; 
  <input type="button" value="now tab to me"> 
  <div class="fixer"> 
   <div class="overlayme"> 
    <br> &nbsp; 
    <br> 
    <input type="button" value="eventually you"> &nbsp; 
    <input type="button" value="will get here"> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials