gpt4 book ai didi

html - 重叠折叠/展开框架集中的内容

转载 作者:太空宇宙 更新时间:2023-11-04 10:55:28 25 4
gpt4 key购买 nike

我如何重叠框架集中折叠/展开的内容显示(我不想缩短顶部框架细节)?我使用一个 3 框架的框架集(顶部框架、左框架和右框架),并且无法使这个东西工作(为重叠顶部框架集中的扩展内容而制作的脚本,如 z-index 逻辑)。是否可以进行此更改?请给些建议。谢谢

框架集页面

<html>
<FRAMESET rows="18%,*" frameborder="YES">
<frame src="frame_a.htm">
<FRAMESET cols="15%,*" frameborder="YES" >
<frame src="frame_b.htm">
<frameset rows="*" frameborder="YES" border="1" framespacing="1" cols="*">
<frame src="frame_c.htm">
</frameset>
</html>

构图页面

<HTML>

<HEAD>

<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script language="JavaScript" src="/home/common/popup/popup.js"></script>
<TITLE>headerFrame.jsp</TITLE>
</HEAD>
<BODY>
<form name="mainfrm" method="post">
<table style="background-color:#DDDDDD" border="1" width="100%">
<tr>
<td>
<a data-toggle="collapse" data-target="#demo">Simple collapsible >></a>
<div id="demo" class="collapse">
<br/><a href="Javascript:popupWindow( 'https://www.google.com.my/') ">testing content</a>
<br/>
<input type="button" value="readMore">
</div>
</td>
</tr>
</table>
<table border="1" cellspacing="0" cellpadding="0" height="100%" width="100%">
</tr>
<tr>
<td width="15% " align="center">TOP FRAME</td>
<td width="40% " align="left " >TOP FRAME</td>
<td width="45% " >TOP FRAME</td>
</tr>
</table>
</form>
</BODY>

</HTML>

当前系统布局的屏幕截图。 enter image description here

但是当我点击展开链接时,所有顶部框架的细节都会被缩短。如何使展开的细节布局与顶框重叠? enter image description here

预期输出: enter image description here

最佳答案

"please give some advice"

  • Stop using frames: they are not supported in HTML5.
  • Use tables when you need a table. Do not use tables for layout purposes.
  • Always specify a docytpe.
  • Use lower case for the HTML tags (or upper case if you want, but don't mix them)
  • Take this list as a recommendation and not as criticism. I made those mistakes too.

正如您在问题中提到的,这可以通过 z-index 解决。您面临的问题可以通过使两个表都具有绝对位置(与左上角对齐)并为第一个表提供比第二个表更高的 z-index 来解决:

<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script language="JavaScript" src="/home/common/popup/popup.js"></script>
<TITLE>headerFrame.jsp</TITLE>
</HEAD>
<BODY>
<form name="mainfrm" method="post">
<table style="background-color:#DDDDDD;position:absolute;top:0;left:0;z-index:2;" border="1" width="100%">
<tr>
<td>
<a data-toggle="collapse" data-target="#demo">Simple collapsible >></a>
<div id="demo" class="collapse">
<br/><a href="Javascript:popupWindow( 'https://www.google.com.my/') ">testing content</a>
<br/>
<input type="button" value="readMore">
</div>
</td>
</tr>
</table>
<table style="position:absolute;top:0;left:0;z-index:1;" border="1" cellspacing="0" cellpadding="0" height="100%" width="100%">
</tr>
<tr>
<td width="15% " align="center">TOP FRAME</td>
<td width="40% " align="left " >TOP FRAME</td>
<td width="45% " >TOP FRAME</td>
</tr>
</table>
</form>
</BODY>

</HTML>

关于html - 重叠折叠/展开框架集中的内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34669120/

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