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

ie绝对定位bug,该怎么处理

2012-09-25 
ie绝对定位bugdiv idlayer1 stylemargin:20px border:1px solid #F88 width:400px div idla

ie绝对定位bug
<div id="layer1" style="margin:20px; border:1px solid #F88; width:400px; ">
  <div id="layer2" style="position:absolute; background-color:#ccc;">Absolute</div>
  <div id="layer3" style=" margin:30px auto;width:200px; height:80px; background-color:#36F;">Normal</div>
</div>


这个是什么原因。ie6,7和ff下不一样

[解决办法]

HTML code
<div id="layer1" style="margin:20px; border:1px solid #F88; width:400px; position:relative;">  <div id="layer2" style="position:absolute; left:0; top:0; background-color:#ccc;">Absolute</div>  <div style="height:0; overflow:hidden;"></div>  <div id="layer3" style="margin:30px auto; width:200px; height:80px; background-color:#36F;">Normal</div></div>
[解决办法]
http://www.blueidea.com/tech/web/2007/4577.asp
[解决办法]
我也想知道原理

热点排行