http://www.google.cn/search?hl=zh-CN&newwindow=1&q=lightbox&btnG=Google+%E6%90%9C%E7%B4%A2&meta=lr%3Dlang_zh-CN&aq=f&oq=ig.:
http://nio.infor96.com/archives/654

解决方案 »

  1.   

    http://www.google.cn/search?hl=zh-CN&newwindow=1&q=lightbox&btnG=Google+%E6%90%9C%E7%B4%A2&meta=lr%3Dlang_zh-CN&aq=f&oq=http://nio.infor96.com/archives/654
      

  2.   


    <!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>
        <style type="text/css">  
            .divBehind
            {
             background-color:Gray;
             width:560px;
             height:160px;
            }
            .divStyle
            {
             background-color:White;
             width:560px;
             height:160px;
            }
        </style>  </head>
    <body>        <div id="divContent" class="divStyle">
            显示Div时,这个层里的内容变灰.
        </div>
        <div id="divHidden" style="display:none; width:300px; height:50px; background-color:Teal;">
            默认隐藏的层    
        </div>
        <input type="button" id="btnShow" value="show Div" onclick="changeDiv(true)" />
        <input type="button" id="btnHidden" value="hidden Div" onclick="changeDiv(false)" />
        
        
        <script type="text/javascript" language="javascript">
            function $(tagStr) {
                return document.getElementById(tagStr);
             }
            
            function changeDiv(flag) {
            //传入bool 值,true:显示,false:隐藏
                if (flag) {
                    $("divHidden").style.display = "block"; //显示隐藏的层.
                    $("divContent").className = "divBehind";  //更改Div样式
                } else {
                $("divHidden").style.display = "none";      //隐藏divHiddent层
                $("divContent").className = "divStyle";     //还原默认样式
                }
            }
        </script></body>
    </html>
    写的比较笼统,但是大概是这么实现的.
    如果想更美观点,可以用Jquery实现,Jquery实现的效果感觉就会更灵活,漂亮些. 嘿嘿