.dis{ width:100%;  background: green; position:absolute; left:0; right:0; top:0; bottom:0; -moz-opacity:0.5; filter:alpha(opacity=50);z-index:99; height:100%; }

解决方案 »

  1.   

    请参考我这个来做,一定可以的
    <html>
    <head>
    <style>
    *{ margin:0; padding:0;}
    body{ height:100%;}
    .dis{ width:100%;  background: green; position:absolute; left:0; right:0; top:0; bottom:0; -moz-opacity:0.5; filter:alpha(opacity=50);z-index:99; height:100%; }
    </style>
    </head>
    <body>
    <select id=sl>
    <option>1</option>
    <option>2</option>
    <option>3</option>
    </select><br>
    dsdddddddddddddddd<br>
    <input type=button value="change" onclick=test() ID="Button1" NAME="Button1"></body>
    </html>
    <script>
    function test()
    {
     var div = document.createElement("div");
     var iframe = document.createElement("iframe"); iframe.className="dis";
     
     div.className="dis";div.appendChild(iframe);
     document.getElementsByTagName("body")[0].appendChild(div);}</script>
      

  2.   

    试过了,在IE还是不行,div始终被ActiveX挡住,并且背景色为白色。
      

  3.   

    http://leadbbs.com自己去看吧,人家的菜单是半透明
      

  4.   

    <body>
    <form id="form1" runat="server">
    <embed type="image/svg+xml" id="svgPoint" width="790" height="590" src="svg.svg" pluginspage="http://www.adobe.com/svg/viewer/install/" />
    </form>
    <iframe src="about:blank" style="z-index: 100; filter: alpha(opacity=0); left: 0px; width: 100%; position: absolute; top: 0px; height: 650px; background-color:transparent"></iframe>
    </body>
    这段代码,iframe在embed的上面,但是背景是白色的.苦等
      

  5.   

    这种问题应该就是楼主用了embed的缘故,src里面引用的SVG文件存在吗?
    要避开这种方法的话,可以把embed部分代码通过js实现,这样就不会解析为ActiveX对象了