<div id="cc">aa</div>
上面这个层,如何悬浮在下面这个页面上,并且让下面这个页面半透明!
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>tree测试页面</title>
</head>
<frameset rows="80,*,80" frameborder="no" border="0" framespacing="0">
  <frame src="top.jsp" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" style="border-bottom:1px solid #c0d2ec;"/>
  <frameset cols="400,*" frameborder="no" border="0" framespacing="0">
      <frame src="panel_test.jsp?f=<%=formID%>" name="treeFrame" scrolling="Yes" noresize="noresize" id="treeFrame" title="treeFrame"  style="border-right:1px solid #c0d2ec;"/>
      <frame src="right.jsp" name="mainFrame" id="mainFrame" title="mainFrame" />
    </frameset>
  <frame src="bottom.jsp" name="bottomFrame" scrolling="No" noresize="noresize" id="bottomFrame" title="bottomFrame" style="border-top:1px solid #c0d2ec;"/>
</frameset>
<noframes><body>
</body>
</noframes></html>
如果我在这个frame其中一个页面里做悬浮和半透明,它只会在本页面里实现,不会对整个frame实现。

解决方案 »

  1.   

    就是假一个style就可以了和js无关
    <style>
    #aa{
       top:1px;
       width:100%;
       height:20%;
       background:#666;
       opacity:0.5
    }
    </style>
      

  2.   

    谢谢lieri111.
    可能没说的太全面,我现在实现的功能是,页面加载的时候先运行加载进度条(这就是那个div),同时整个页面的背景半透明,并且无法点击页面里的内容,等页面完全加载完毕后,加载进度条消失,页面恢复正常,并且可以点击。如果是一个单页面,上面所说的功能,我可以实现。可是现在是一个frame,可我又不想用iframe来实现,问题就出现,我仅仅只能操作frameset里面,无法操作整个frame。
      

  3.   

    再加上position:absolute;
    z-index:1000;