gpt4 book ai didi

css - 如何将 DIV 置于 FRAMESET 之上?

转载 作者:技术小花猫 更新时间:2023-10-29 12:11:46 26 4
gpt4 key购买 nike

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

最佳答案

您不能将 DIV 放置在 framesets 之上。实现的唯一方法是将 DIV 放置在 iFrame 上。至少对于较新的浏览器 ( no IE6 )。

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

#flashContent {

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

width:400px;
height:400px;
background-color:red;
}

关于css - 如何将 DIV 置于 FRAMESET 之上?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9047178/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com