gpt4 book ai didi

html - 位置固定在 IE 中不起作用

转载 作者:太空宇宙 更新时间:2023-11-04 00:20:52 24 4
gpt4 key购买 nike

这是我的代码,它在非 IE 浏览器中运行良好。该代码是在 JQuery UI 对话中加载的 iframe 的一部分。在 IE 9 中测试。

<div style="height:400px;width:400px;overflow:auto">
<table>
<tr>
<td>content</td>

<td>

<div style="position:fixed;height:100px;">
Long Content.............
</div>

</td>
</tr>
</table>
</div>

这是我的DOCTYPE

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

最佳答案

它只适用于非 IE 浏览器,因为它们对伪造代码有更好的容忍度。

删除多余的<td><td>里面,你究竟想通过放置 position:fixed 来实现什么?在表格单元格内?大多数情况下,position:fixed元素应该是 <body> 的直接子元素元素...

关于html - 位置固定在 IE 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9231524/

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