Vikings

IE6下 SELECT 标记 忽略 Z-index BUG

Bug描述: SELECT elements ignore Z-index ("windowed element" problem)
连接:http://www.throbs.net/web/articles/IE-SELECT-bugs/#ieZIndex

问题原因:
1. select  html标记在IE6下的解析不管Z-index
2. div 不能遮盖select,

解决思路:
1. 在select上用iframe遮盖
2. 在iframe上用div遮盖
3. iframe的width,height,top,left与div一样大.


示例代码
#zindexDiv{
position:absolute;
z-index:50;
width:expression(this.nextSibling.offsetWidth);
height:expression(this.nextSibling.offsetHeight);
top:expression(this.nextSibling.offsetTop);
left:expression(this.nextSibling.offsetLeft);
/*background-color:green;?ff????????,????????????????*/
}

#divUp{
z-index:99;
position:absolute;
background-color:red;
width:100;
height:18;
overflow:hidden;
height:60px;
}

#ddlTest{
width:200;
z-index:1;
}
</style>


<body>
<iframe id="zindexDiv" frameborder="0"></iframe>
<div id="divUp">aaaaaaa<br>bbbbbbb<br>ccccccc</div>

posted on 2008-06-27 11:04 Vikings 阅读(1837) 评论(0)  编辑  收藏


只有注册用户登录后才能发表评论。


网站导航: