首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

ie6的height 100%失效

2012-10-19 
求救ie6的height 100%失效HTML code!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN ht

求救ie6的height 100%失效

HTML code
<!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><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>无标题文档</title></head><body><input name="" type="button" value="aaa" onclick="aa()" /><div id="ddd" style="width:200px; height:200px;" style="border:1px solid #000000;"><div style="width:100%; height:100%; background:#000000;"> </div></div><script>function aa(){document.getElementById("ddd").style.height = "300px"}</script></body></html>


ie7和ff都会自动填充
但ie6就定在那里了
怎么办啊

[解决办法]
出现这个问题的原因是因为IE6渲染的问题,通过某些CSS的属性可以让DOM改变之后再次渲染。

热点排行