gpt4 book ai didi

html - div 样式 ="overflow:auto"在 IE 10 中无法正常工作

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

我有一个只有一行和 2 个 tds 的表。

在每个 td 中,我使用一个 div 并将溢出设置为自动。我的代码在 chrome、firefox 和 IE 8、9、10 中运行良好,但在 IE 11 中运行不正常。

在正确的情况下,滚动条出现,我可以向下滚动,但在 IE 11 中没有出现滚动条。

这就是问题所在的部分代码。

这是我编写的代码的链接。jsfiddle.net/XrH7f/

代码

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML Transitional//EN">
<META http-equiv="Content-Type" content="text/html; charset=windows-874">

<html>
<head><style>
table
{
border-top-color: #d3dfe2;
border-right-color: #d3dfe2;
border-bottom-color: #d3dfe2;
border-left-color: #d3dfe2;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
border-image-source: none;
border-image-slice: 100%;
border-image-width: 1;
border-image-outset: 0;
border-image-repeat: stretch;
}
table td
{
border-top-color: #d3dfe2;
border-right-color: #d3dfe2;
border-bottom-color: #d3dfe2;
border-left-color: #d3dfe2;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-image-source: none;
border-image-slice: 100%;
border-image-width: 1;
border-image-outset: 0;
border-image-repeat: stretch;
}
td
{
color: #003366;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
}

</style></head>
<body text="#000000" topmargin="0" leftmargin="1" bgcolor="#ffffff"><form name="form1" action="page2.jsp" method="POST">

<table width="100%" align="center" bordercolor="#d3dfe2" border="1" cellspacing="0" cellpadding="1">

<tbody>
<tr bgcolor="#ecfefe">


<td width="17%" height="100" align="right" valign="middle">

<div style="width: 100%; height: 100%; overflow: auto;">

Select Make:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ALL: <input name="allMake" onclick="selectallMe();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="ALL" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />


Abcdef <input name="Make" onclick="selectAllMake();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="BBDC " />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />

Abcdef <input name="Make" onclick="selectAllMake();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="MBCL " />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />

Abcdef <input name="Make" onclick="selectAllMake();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="LIQUIDITY " />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />

Abcdefghijkl <input name="Make" onclick="selectAllMake();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="TPH " />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />

Abcdef <input name="Make" onclick="selectAllMake();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="CGCSL " />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />

Abcdef <input name="Make" onclick="selectAllMake();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="MB " />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />

Abcdef <input name="Make" onclick="selectAllMake();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="CG " />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
>

</td>


<td width="17%" height="100" align="right" valign="middle">

<!-- Here we will place the check Boxes of "Select Make" and "Select Condition" -->

<div style="width: 100%; height: 100%; overflow: auto;">

Select Condition:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ALL: <input name="allCondition" onclick="selectAllCn();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="ALL" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />

1<input name="Condition" onclick="selectAllCondition();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="DEMO" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />

2<input name="Condition" onclick="selectAllCondition();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="NEW " />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />

3<input name="Condition" onclick="selectAllCondition();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="SOLD" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />

4<input name="Condition" onclick="selectAllCondition();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="SR " />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />

5<input name="Condition" onclick="selectAllCondition();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="WH " />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />

6<input name="Condition" onclick="selectAllCondition();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="VQC " />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />

7<input name="Condition" onclick="selectAllCondition();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="PHWH" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />

8<input name="Condition" onclick="selectAllCondition();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="PHSR" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />

9<input name="Condition" onclick="selectAllCondition();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="DST " />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />

10<input name="Condition" onclick="selectAllCondition();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="DIS " />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />

11<input name="Condition" onclick="selectAllCondition();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="DB " />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />

12<input name="Condition" onclick="selectAllCondition();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="DST2" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />

13<input name="Condition" onclick="selectAllCondition();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="FLET" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />

14<input name="Condition" onclick="selectAllCondition();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="MS " />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />

</div>

</td>

</tr>

</tbody>
</table>

</form></body></html>

最佳答案

啊哈。经过一番研发终于得到了答案。当以 % 指定 div 标签的高度时会产生问题。将第一个 div 的高度从 100% 更改为 100px 和 volla !!!!!得到修复。感谢大家的帮助。

同时设置第一个td的vlign属性为top from middle。

关于html - div 样式 ="overflow:auto"在 IE 10 中无法正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19488129/

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