如何将DIV置于FRAMESET之上



我想在我的框架集上绘制div层。我听说DIV可以放在<frameset>中,但对我不起作用。

以下示例不起作用。我甚至没有在Firebug HTML检查器中看到DIV。

<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Test of frameset with div</title>
<style type="text/css">
#flashContent { 
position:fixed;
left:200px;
bottom:200px;
width:400px; 
height:400px; 
background-color:red;
z-order:1000;
 }
</style>
</head>
<frameset rows="*,100px" style="z-order:10">

<frame src="content1.html">
<frame src="bottom.html">
<div id="flashContent">
    Something
</div>

</frameset>
</html>

不能将DIVs放置在framesets的顶部。实现这一目标的唯一方法是将您的DIV置于iFrame之上。至少对于较新的浏览器(没有IE6)。

根据您的代码示例,您必须将DIV定位为绝对包括z-index属性:

#flashContent {
  position: absolute;
  left: 200px;
  bottom: 200px;
  z-index: 2;
  width:400px; 
  height:400px; 
  background-color:red;
}

最新更新