CSS Transparent Overlay

CSS Transparent Overlay. This will work on IE 8 and earlier versions also.


<!DOCTYPE html>
<html>
 <head>
  <style>
   .overlay{
      position: fixed;
      top: 0;
      left: 0;
      z-index: 1000;
      width: 100%;
      height: 100%;
      background: #000000;
      opacity: 0.7;
      filter: alpha(opacity=70);
   }
  </style>
 </head>
 <body>
  <div class="overlay"></div>
  <div>
   sdfdssdfdsf<br/>
   sdfdssdfdsf<br/>
   sdfdssdfdsf<br/>
   sdfdssdfdsf<br/>
  </div>
 </body>
</html>

Demo

Note : This will not work on IE when using quirks mode.

No comments:

Post a Comment