jquery pop-up layer, click the button to eject the mask layer, there is a close button

Source: Internet
Author: User

<!DOCTYPE HTML><HTMLxmlns= "http://www.w3.org/1999/xhtml"><Head><title>jquery Popup Layer Effect</title><Metacontent= "Webpage effect, special effect code, JQUERY,CSS effect, JS code, advertising slide, picture switch"name= "keywords" /><Metacontent= "jquery popup effect, there is a close button, the code is easy to understand, you can modify the pop-up layer parameters." "name= "description" /><Scriptsrc= "/uploads/common/js/jquery-1.4.2.min.js"type= "Text/javascript"></Script><style>. Black_overlay{Display:None;position:Absolute;Top:0%; Left:0%;width:100%;Height:100%;Background-color:Black;Z-index:1001;-moz-opacity:0.8;Opacity:.;Filter:Alpha (opacity=80);}. White_content{Display:None;position:Absolute;Top:10%; Left:10%;width:80%;Height:80%;Border:16px Solid LightBlue;Background-color: White;Z-index:1002;Overflow:Auto;}. White_content_small{Display:None;position:Absolute;Top:20%; Left:30%;width:40%;Height:50%;Border:16px Solid LightBlue;Background-color: White;Z-index:1002;Overflow:Auto;}</style><Scripttype= "Text/javascript">//Eject hidden layerfunctionShowdiv (show_div,bg_div) {document.getelementbyidx_x (show_div). Style.display='Block';d ocument.getelementbyidx_x (bg_div). Style.display='Block' ;varBgdiv=document.getelementbyidx_x (bg_div); Bgdiv.style.width=Document.body.scrollWidth;//bgdiv.style.height = $ (document). Height ();$("#"+bg_div). Height ($ (document). Height ());};//Close the popup layerfunctionClosediv (show_div,bg_div) {document.getelementbyidx_x (show_div). Style.display='None';d ocument.getelementbyidx_x (bg_div). Style.display='None';};</Script></Head><Body><inputID= "Button1"type= "button"value= "Click on popup Layer"onclick= "Showdiv (' mydiv ', ' fade ')" /><!--popup layer when background layer div -<DivID= "Fade"class= "Black_overlay"></Div><DivID= "Mydiv"class= "White_content"><Divstyle= "text-align:right; cursor:default; height:40px;"><spanstyle= "FONT-SIZE:16PX;"onclick= "Closediv (' mydiv ', ' fade ')">Shut down</span></Div>for now, I still like the pop-up layer of my own makeover. This is also used in the project itself. </Div></Body></HTML>

Reprinted from: Http://blog.sina.com.cn/s/blog_81a3c47b01017nve.html If there is infringement please contact delete

jquery pop-up layer, click the button to eject the mask layer, there is a close button

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.