1 2 3 4 jQuery弹出层效果 5 6 7 8 9 .black_overlay{10 display: none;11 position: absolute;12 top: 0%;13 left: 0%;14 width: 100%;15 height: 100%;16 background-color: black;17 z-index:1001;18 -moz-opacity: 0.8;19 opacity:.80;20 filter: alpha(opacity=80);21 }22 .white_content {23 display: none;24 position: absolute;25 top: 10%;26 left: 10%;27 width: 80%;28 height: 80%;29 border: 16px solid lightblue;30 background-color: white;31 z-index:1002;32 overflow: auto;33 }34 .white_content_small {35 display: none;36 position: absolute;37 top: 20%;38 left: 30%;39 width: 40%;40 height: 50%;41 border: 16px solid lightblue;42 background-color: white;43 z-index:1002;44 overflow: auto;45 }46 47 48 //弹出隐藏层49 function ShowDiv(show_div,bg_div){50 document.getElementById(show_div).style.display='block';51 document.getElementById(bg_div).style.display='block' ;52 var bgdiv = document.getElementById(bg_div);53 bgdiv.style.width = document.body.scrollWidth;54 // bgdiv.style.height = $(document).height();55 $("#"+bg_div).height($(document).height());56 };57 //关闭弹出层58 function CloseDiv(show_div,bg_div)59 {60 document.getElementById(show_div).style.display='none';61 document.getElementById(bg_div).style.display='none';62 };63 64 65 66 67 68查看更多关于JQuery弹出层,实现弹层切换,可显示可隐藏。_html/css_WEB-ITnose的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did109877
JQuery弹出层,实现弹层切换,可显示可隐藏。_html/css_WEB-ITnose
阅读:39次