本帖最后由 mingfish2 于 2012-07-27 12:12:44 编辑

解决方案 »

  1.   

    <body>
        <style type="text/css">
            *{padding:0;margin:0;}
            body{padding:20px;}
            .overlay{
                position:absolute;
                width:500px;
                height:500px;
                border:1px solid red;
                z-index:100;
    background-color:#999999;
            }
        </style>
    <div class="overlay" style="filter:alpha(opacity=0)"></div>
        <a href="javascript:;" onclick="alert('hello')">hello</a>
    </body>
    这样试试
      

  2.   

    额  那样改了火狐又不起作用了
    style="opacity:0.0;filter:alpha(opacity=0);"
    改成这样看看行不行
      

  3.   

    .g-cv{
    maring:0;
    padding:0;
    position:absolute;
    left:0;
    top:0;
    width:100%;
    height:100%;
    background:#000;
    filter:alpha(opacity=30);
    opacity:0.3;
    }
      

  4.   

    <html>
    <head>
    <meta http-equiv="Content-type" content="text/html;charset=utf8" /> <style>
    *{padding:0;margin:0;}
    body{padding:20px;}
    .overlay{position:absolute;width:500px;height:500px;border:1px solid red;z-index:100;display:none;}
     </style></head><body>

    <div class="overlay" id="over"></div>
    <a href="javascript:;" onclick="change()">hello</a>
    <script>
    function change()
    {
    document.getElementById('over').style.display="block";
    }
    </script>
    </body></html>