Glass pane all over the page - HTML CSS CSS Property

HTML CSS examples for CSS Property:z-index

Description

Glass pane all over the page

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">
#top-layer {
   position:fixed;
   color:Chartreuse;
   width:100%;
   height:100%;
   margin:0;
   padding:0;
   top:0;
   left:0;
   opacity:0.8;
   background-color:yellow;
   z-index:100000;<!--from  w w  w .jav a  2s  . co  m-->
}
</style> 
 </head> 
 <body> 
  <div id="top-layer">
    Lorem ipsum d 
  </div> 
  <p>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 iaculis. Aliquam erat </p>  
 </body>
</html>

Related Tutorials