显示2帧的DIV

时间:2016-03-18 04:33:35

标签: jquery html asp.net .net

------------------------------------------------
|      |                   
| frame 1                                       |
|      |                                        |
|      |                                        |
|      |                 frame 2                |
|      |                                        |
| - ------------|                               |
|      |        |                               |
|    MY Div     |                               |
|      |        |                               |
----------------------------------------------- |

我尝试过:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Test</title>
</head>

<frameset rows="0,*%" frameborder="0" border="0" bordercolor="#999999" framespacing="0">
<frame name="Top" src="./aspx/Main/Banner.aspx" scrolling="no" noresize="yes"></frame>
<frameset cols="20%,*" frameborder="1" border="3" bordercolor="#999999" framespacing="3" id="Bottom">
<frame name="TreeViewFrame" src="./aspx/Main/TreeViewPage.aspx" scrolling="auto" id="TreeViewFrame" />
<frame name="ContentFrame" src="./aspx/Main/ContentPage.aspx" id="ContentFrame" />
</frameset>
</frameset>
</html>

我的问题是我应该将div放在哪里ContentFrame或TrewViewPage,如何在两帧之间得到叠加DIV

由于

1 个答案:

答案 0 :(得分:0)

您可以创建一个container作为父母,然后float同时iframe absolutediv位置position: relativez-index请注意,容器必须为body,html { width: 100%; height: 100%; } #Container { height: 500px; position: relative; } #mydiv { width: 400px; height: 200px; background: orange; position: absolute; bottom: 0; left: 0; } iframe { box-sizing: border-box; } #iframe1 { width: 20%; height: 100%; background: red; float: left; } #iframe2 { width: 80%; height: 100%; background: blue; float: right; }。如果需要,可以使用<div id="Container"> <iframe id="iframe1"> </iframe> <iframe id="iframe2"> </iframe> <div id="mydiv"> </div> </div>订购图层。

EAI_AGAIN
https://registry.npmjs.org/