4

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

以下示例不起作用。我什至没有在 Firebug HTML-inspector 中看到 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>
4

1 回答 1

7

您不能定位DIVsframesets. 实现的唯一方法是将您DIV的位置放在iFrame. 至少对于较新的浏览器(没有 IE6)。

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

#flashContent {

  position: absolute;
  left: 200px;
  bottom: 200px;
  z-index: 2;

  width:400px; 
  height:400px; 
  background-color:red;
}
于 2012-01-28T20:27:43.430 回答