gpt4 book ai didi

css - IE 忽略 zIndex

转载 作者:太空宇宙 更新时间:2023-11-03 22:08:12 24 4
gpt4 key购买 nike

我有这个文本区域(它在单击特定按钮后展开)应该位于该文本输入字段上方。在 FF 和 Chrome 中,它正在工作。但不是在 IE(6+7) 中。有谁知道问题出在哪里以及我该如何解决?

<html>
<head>
<style type="text/css">
.Tbl { width: 100%; }
.Col1 { width: 10%; }
.Col2 { width: 90%; }

.CellTA { background-color: #00F; vertical-align: top; padding: 5px; }
.DivTA { position: relative; }
.DivTA2 { position: absolute; background-color: #FF0; padding: 5px; }
.TA { position: relative; z-Index: 10; height: 50px; width: 200px; }

.CellInp { background-color: #F0F; padding: 5px; }
.DivInp { position: relative; width: 100%; background-color: #0F0; }
.Inp { position: relative; width: 200px; }
</style>
</head>
<body>
<table class="Tbl">
<colgroup>
<col class="Col1" />
<col class="Col2" />
</colgroup>
<tr>
<td>Ref</td>
<td class="CellTA">
<div class="DivTA">
<div class="DivTA2">
<textarea class="TA"></textarea>
</div>
</div>
</td>
</tr>
<tr>
<td>eMail</td>
<td class="CellInp">
<div class="DivInp">
<input type="text" class="Inp">
</div>
</td>
</tr>
</table>
</body>
</html>

提前致谢

编辑:添加填充并更改 DivTA2 的背景颜色

最佳答案

IE 对待 z-index 的方式与其他浏览器略有不同。这些博客条目可能对您有所帮助:

http://annevankesteren.nl/2005/06/z-index

http://brenelz.com/blog/squish-the-internet-explorer-z-index-bug/

简而言之,我认为您可能需要向拥有它的元素的父元素添加一个 z-index。 (我不完全确定将它向上添加一级是否可行——如果这不起作用,您也可以尝试将它添加到祖父元素。)

关于css - IE 忽略 zIndex,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3701402/

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