Today to implement a pop-up box centered problem, because there are scroll bars, do not know how to set the height.
Thanks again for the source code provided by netizens. Because of the relatively urgent, a moment to forget the source, really sorry.
<style>. Joinclub{width:350px;Height:60px;Padding-left:20px;Padding-top:20px;Border:1px solid #a3bad9;Border-radius:5px;background:#fff;Padding-top:10px;position:Absolute;Z-index:99999999;Display:None; Left:50%; /*FF IE7*/Top:50%; /*FF IE7*/Margin-left:-220px!important; /*FF IE7 The value is half the width of itself*/Margin-top:-140px!important; /*FF IE7 The value is half the height of itself*/Margin-top:0px;position:fixed!important; /*FF IE7*/position:Absolute; /*IE6*/_top:expression (eval (document.compatmode && document.compatmode== ' Css1compat ')? Documentelement.scrolltop + (document.documentelement.clientheight-this.offsetheight)/2:/*IE6*/Document.body.scrollTop + (document.body.clientheight-this.clientheight)/2); /*IE5 IE5.5*/ }. bg123{Background-color:#ccc;width:100%;Height:100%;Z-index:99999998; Left:0;Top:0; /*FF IE7*/Filter:Alpha (OPACITY=50); /*IE*/Opacity:0.5; /*FF*/position:fixed!important; /*FF IE7*/position:Absolute; /*IE6*/_top:expression (eval (document.compatmode && document.compatmode== ' Css1compat ')? Documentelement.scrolltop + (document.documentelement.clientheight-this.offsetheight)/2:/*IE6*/Document.body.scrollTop + (document.body.clientheight-this.clientheight)/2); /*IE5 IE5.5*/ }</style>
The following section of code will be placed between </body> and
</body><div class= "Joinclub" id= "Joinclub" style= "Display:none" > I'm the center of the mask. <input type= " Button "value=" Close Me "onclick=" Closecustomer () "/></div><div id=" bg123 "alt=" I am the background color of the matte "class=" bg123 "style= "Display:none;" ></div><script type= "Text/javascript" > function Closecustomer () { document.getElementById ( "Joinclub"). Style.display = ' None '; document.getElementById ("bg123"). Style.display = ' none '; } function Join_club () { $ ("#joinclub"). HTML ($ ("#div_hid"). html ()); document.getElementById (' Joinclub '). style.display = ' block '; document.getElementById (' bg123 '). style.display = ' block '; } </script>
Thank
JS Matte Effect