在 HTML 中跨 2 个框架显示 DIV [英] Display a DIV across 2 frames in HTML

查看:29
本文介绍了在 HTML 中跨 2 个框架显示 DIV的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含两个框架的页面.我需要在顶部框架中定义一个 div,以便它也显示在底部框架上.

Hi I have a page with two frames. I need a define a div in a top frame, such that it gets displayed over bottom frames also.

------------------------------------------------
|               Frame 1               '<myDiv>'|
|                                     '       '|
|-------------------------------------'       '|
|                                     '       '|
|                                     '-------'|
|                                              |
|               Frame 2                        |
|                                              |
|                                              |
|                                              |
-----------------------------------------------|

<frameset rows="*" cols="*" frameborder="no" border="0" id="titleFrame" framespacing="0">
  <frame src="title.html" name="topFrame" scrolling="No" id="titleFrameDiv" noresize="noresize" title="title" />
      <frameset id="myFrameDiv" rows="100%,*" cols="*" framespacing="0" frameborder="no" border="0">
       <frame src="main.html" id="mainFrame" name="mainFrame" scrolling="Auto" title="main" />
      </frameset>
  </frameset>

没关系,即使我需要将其更改为 iframe.在我目前的设计中我怎么能做到这一点..

Its ok, even I need to change this to iframes. How can I do this in my current design..

推荐答案

最接近的是在每个文档中都有一个 div 的副本.

The closest you could come would be to have a duplicate of the div in each document.

然后您可以使用固定的 CSS 定位来排列它们.

You can then use fixed CSS positioning to line them up.

这篇关于在 HTML 中跨 2 个框架显示 DIV的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆