日期:2014-05-17 浏览次数:20815 次
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<div style="height:150px;border:solid 1px blue;overflow:hidden;">
第1个<input type="text" style="height:20px;border:solid 1px green;margin:5px;" /><br />
第2个<input type="text" style="height:20px;border:solid 1px green;margin:5px;" /><br />
第3个<input type="text" style="height:20px;border:solid 1px green;margin:5px;" /><br />
第4个<input type="text" style="height:20px;border:solid 1px green;margin:5px;" /><br />
第5个<input type="text" style="height:20px;border:solid 1px green;margin:5px;" />
点击这个textbox,或者通过tab键focus到6、7两个textbox,
就会发现整个div的内容会上浮,
而且即使刷新页面,
也不能恢复到原始状态。
<span style="color:red">如何阻止这种上浮?</span><br />
第6个<input type="text" style="height:20px;border:solid 1px green;margin:5px;" /><br />
第7个<input type="text" style="height:20px;border:solid 1px green;margin:5px;" /><br />
</div>
</body>
</html>