之前在网上找到类似的,但是用不了大图,修改参数会出现很多BUG。链接地址http://news.qq.com/a/20121009/001005.htm有肯帮忙的朋友万谢啊

解决方案 »

  1.   

    我们才学了这个,lightbox<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>
    <head>
             <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>CSS Lightbox效果</title>
    <style>
    body{font-size:11px; font-family:Verdana, Arial, Helvetica, sans-serif;}
    a{color:#000; text-decoration:none;}
    .img{border:0px;}
    .black_overlay{
    display: none;
    position: absolute;
    top: 0%;
    left: 0%;
    width: 100%;
    height: 100%;
    background-color: black;
    z-index:1000;
    -moz-opacity: 0.8;
    opacity:.80;
    filter: alpha(opacity=80);
    }
    .white_content {
    display: none;
    position: absolute;
    top: 15%;
    left: 25%;
    width: 575px;
    height: 445px;
    border: 16px solid #FFF;
    border-bottom:none;
    background-color: white;
    z-index:1002;
    overflow: auto;
    }
    </style>
    </head>
    <body>
    <p><a href = "#" onclick = "document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'"><img src="images/small.jpg" width="120" border="0"/></a></p>
        
    <div id="light" class="white_content"><img src="images/big.jpg" border="0" width="540"/> <a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'">Close</a></div>
            
    <div id="fade" class="black_overlay"></div>
    </body>
    </html>