IE6下与float元素相邻的position:absolute元素消失BUG
2011-01-26 18:00
573 查看
代码
<!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=utf-8" /> <title>IE6下与float元素相邻的position:absolute元素消失BUG</title> <style type="text/css"> *{ margin:0; padding:0} .wrap{ width:800px; height:200px; margin:0 auto; position:relative} .left{ width:300px; height:200px; background-color:#F00; float:left} .right{ width:500px; height:200px; background-color:#00F; float:left} .pos{ width:600px; height:30px; background-color:#000; color:#fff; position:absolute; left:0; top:0;} .pos2{ top:60px;} </style> </head> <body> <div class="wrap"> <div class="pos">如果不加下面的div,在IE6下是看不见我的</div> <!--[if IE 6]><div></div><![endif]--> <div class="left"></div> <div class="right"></div> <!--[if IE 6]><div></div><![endif]--> <div class="pos pos2">如果不加上面的div,在IE6下是看不见我的,总之是要与浮动之间加个空的DIV</div> </div> </body> </html>
相关文章推荐
- IE6下与float元素相邻的position:absolute元素消失BUG
- IE6下position:absolute相邻元素margin-top失效的bug
- 绝对定义(position:absolute)的相邻元素margin-top在IE6下失效
- ie6的position:absolute与height:100% bug
- IE6下position:absolute的定位BUG(转载)
- IE6,7局部滚动条中元素position:relative或绝对定位滚动无效BUG
- IE6 CSS bug: position:relative元素被overflow:auto/scroll元素包含
- IE6下position:absolute定位错误的bug和解决方法
- IE6 下关于Position:absolute;属性对同级元素的影响问题
- IE6、IE7下绝对定位position:absolute和margin的冲突bug解决方法
- inline元素、inline-block元素在float、position:fixed、position:absolute之后出现的问题
- IE6 CSS bug: position:relative元素被overflow:auto/scroll元素包含
- IE6 CSS bug: position:relative变成了absolute
- css-IE6的3像素bug(当浮动元素与非浮动元素相邻时)
- IE6Bug,外层container设置了overflow:auto,但是内层嵌套元素有position:relative的时候,显示错误。
- IE6的BUG,float浮动元素被非float元素挤到第二行
- IE6下position:absolute的定位BUG(转载)
- IE6下 position:absolute:定位的 bottom 定位偏移bug
- IE6,浮动(float)遇到绝对定位(position)-->ie6使用绝对定位position:absolute,box不显示
- IE7-/Win: 在浮动元素后的定义了“position:absolute”的元素框可能会消失