簡體   English   中英

如何把DIV放在FRAMESET上?

[英]How to put DIV over FRAMESET?

我想在我的框架集上繪制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>

您不能將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;
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM