<! DOCTYPE html>"Utf-8"/> <title> cover Layer </title> <style>/*logon Layer*/#choose {display:none; width:360px; height:230px; Background: #69F; Position:absolute; Top: -%; Left: +%; Z-index: +; Opacity:0.8;/*transparency of the background: (Firefox applies;)*/Filter:alpha (Opacity= the);/*transparency of the background: (ie applies);*/ } /*Mask Layer*/#mid {display:none; Width: -%; Height: -%; background:# the; Position:absolute; Top:0; Left:0; Z-index:Ten; Opacity:0.4;/*transparency of the background: (Firefox applies;)*/Filter:alpha (Opacity= +);/*Transparency of the background: (ie applicable);} </style> <!--filled content begins to write something inside the body, because the cover layer is going through the body to get the high width of the interface, so that the body's aspect at the same time determines the height of the cover layer. But the code of Friends in peacetime use this demo, because the body of the writing is certain, and is more, so be sure to ignore the content I filled below1<br/>1<br/>1<br/>1<br/> 1<br/> 1<br/> 1<br/> 1<br/>1<br/>1 <br/>1<br/> 1<br/> 1<br/> 1<br/> 1<br/>1<br/>1<br/>1<br/> 1 <br/> 1<br/> 1<br/> 1<br/>1<br/>1<br/>1<br/> 1<br/> 1<br/> 1<br/> 1<br/>1<br/>1<br/>1<br/> 1<br/> 1<br/> 1<br/> 1<br/> 1<br/>1<br/>1<br/> 1<br/> 1<br/> 1<br/>
1<br/>1<br/>1<br/>1<br/> 1<br/> 1<br/> 1<br/ > 1<br/>1<br/>1<br/>1<br/> 1<br/> 1<br/> 1<br/> 1<br/>1<br/ >1<br />1<br /> 1<br /> 1<br /> 1<br /> 1<br />1<br />
<!--fill End-->
<!--form Layer--<div id= "Choose" > <!--form head-to-<a CLASS=CL Ose> Close </a> <table> <tr> <td colspan= "3" class= " TD "> </td> </tr> <tr> <TD class= "TD1" > Login:</td> <td class= "TD2" ><input type= "text"/></td> <TD class= "td3" >*</td> </tr> <tr> <TD class= "TD1" > Secret code:</td> <td class= "TD2" ><input type= "Passwor D "/></td> <td class=" td3 ">*</td> </tr> & lt;tr> <td class= "TD1" > Verification Code:</td> <td class= "TD2" ><input Type= "Text"/></td&Gt <TD class= "td3" >*</td> </tr> <tr> <TD Co Lspan= "3" align= "center" ><input type= "submit" value= "Login"/></td> </tr> & Lt;/table> </div> <!--overlay--<div id= "mid" ></div> </ body> <script type= "Text/javascript" src= "Js/jquery-1.11.2.min.js" ></script> <script> $ (function () {$ (". Click"). Click (function () {var BH = $ ("body"). Height (); Gets the height of the current browser interface var bw = $ ("Body"). width (); Gets the width of the current browser interface $ ("#mid"). CSS ({HEIGHT:BH,//high-width assignment width of div to cover layer : BW, display: "Block"//overlay); $ ("#choose"). Show (); }); $ (". Close"). Click (function () {$ ("#choose")). Hide (); $ ("#mid"). Hide (); }); }); </script>
Masking layer Implementation (jquery+css+html)