就是用一个js特效作出来的相册展示,当单击一个图片,图片从中间弹出来...
然后希望弹出来之后图片后面的背景全部被禁用,鼠标不能点击,而且整个页面除了弹出来的图片之后都变灰...

解决方案 »

  1.   

    lightbox~!嘿嘿,找找这个东西吧
      

  2.   

    <style type="text/css">
    <!--
    html,body {height:100%; margin:0px; font-size:12px;}.mydiv {
    background-color: #f9fff6;
    border: 1px solid #009900;
    text-align: center;
    line-height: 25px;
    font-size: 13px;
    font-weight: bold;
    z-index:99;
    width: 50px;
    height: 50px;
    left:0%;/*FF IE7*/
    top:0%;/*FF IE7*/margin-left:0px!important;/*FF IE7 half of its width */
    margin-top:0px!important;/*FF IE7 half of its height*/margin-top:0px;position:fixed!important;/*FF IE7*/
    position:absolute;/*IE6*/_top:  0:}
    .bg {
    background-color: #C2BEBF;
    width: 100%;
    height: 100%;
    left:0;
    top:0;/*FF IE7*/
    filter:alpha(opacity=40);/*IE*/
    opacity:0.4;/*FF*/
    z-index:1;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>
    <script language="javascript" type="text/javascript">
    function showDiv(){
    if(document.all){
        document.getElementById('bg').innerHTML = "<iframe style='width:100%;height:100%;left:0px;top:0px;position:absolute;filter:alpha(opacity=0);z-index:-1;border:0px'/>";
    }
    document.getElementById('popDiv').style.display='block';
    document.getElementById('bg').style.display='block';
    }function closeDiv(){
    document.getElementById('popDiv').style.display='none';
    document.getElementById('bg').style.display='none';
    }</script>
    <div id="popDiv" class="mydiv" style="display:none;" onclick="closeDiv()">关闭<br/>
    <!--<a href="javascript:closeDiv()">close</a>--></div>
    <div id="bg" class="bg" style="display:none;"></div><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>test</title></head><body onload="showDiv()"></body>
    </html>
      

  3.   

    可以自己写个遮罩层, 通过z-index来把后面的东西挡住, 也可以找其他的扩展库, 如lightbox、thickbox等。
      

  4.   

    加个大层/*css*/#{
    background:#000;
    width: 100%;
    left:0;
    top:0;
    filter:alpha(opacity=40);/*IE*/
    opacity:0.4;/*FF*/
    z-index:1000;
    position:absolute
    }
    //JS$("#").css("height",$(document).height());
    其它的像图片展示层就你自己设置了<!--html-->
    <body>
    <div id=""></div>
    <div id="图片展示区">图片展示区</div>