Mask effect below pop-up box using pure CSS - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Box

Description

Mask effect below pop-up box using pure CSS

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">
.turnIntoOverlay {<!-- www . ja  va 2 s . c  o  m-->
   position:fixed;
   background-color:Chartreuse;
   top:61px;
   max-width:681px;
   border:7px solid yellow;
   box-shadow:0 2px 11px blue;
   max-height:801px;
   overflow:auto;
   padding:11px;
   z-index:81;
}

.turnIntoOverlay:before {
   content:"";
   background-color:pink;
   position:fixed;
   width:100%;
   height:100%;
   z-index:-2;
   opacity:0.5;
   top:0;
   left:0;
}

.turnIntoOverlay:after {
   position:absolute;
   width:100%;
   height:100%;
   top:0;
   left:0;
   background-color:OrangeRed;
   z-index:-2;
   content:"";
}
</style> 
 </head> 
 <body> 
  <div class="turnIntoOverlay">
    Lorem ipsum dolor sit amet, consecte 
   <input> 
  </div> 
  <div>
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed fermentum. Aliquam erat volutpat. Vestibulum tortor neque, ornare vitae tempor hendrerit, luctus at neque. Phasellus sed quam pharetra, tincidunt tortor in, pharetra nisl. Maecenas aliquam luctus mauris, vitae venenatis diam imperdiet vel. Donec tortor diam, pretium vitae nibh vitae, consectetur lacinia sem. Proin luctus facilisis volutpat. Ut semper sit amet purus quis ornare. Quisque lobortis neque vitae tempor 
  </div>  
 </body>
</html>

Related Tutorials