ie6下select层级设置bug是ie6下一直就有的问题,但ie的粉丝居高不下,程序员口中没有不能,只有想办法解决,上网搜了一下,不知道是不是人品问题,测试后只一种可解决方案,共享出来供大家参考。
select层级设置不生效但,iframe可以设置层级并且层级在select上,所以把iframe层级设置在select上,input层级在iframe上就可以了.
<style>
.overst{ width:234px; height:20px;
position:absolute; margin-top:2px;}
iframe { width:100%; height:20px;
position:relative; z-index:-1;
filter:alpha(opacity=0);border-color: background;}
</style>
<span
>
<input
type="text" id="durl" style="width:
234px;position:absolute;margin-top:1px;z-index:100;"
onmouseover="showUrl();"
value="1"/>
<div
class="overst">
<!--[if IE
6]><iframe></iframe><![endif]-->
</div>
<span style="width: 18px; ">
<select
id="db_url"
onchange="selectUrl()"
style="width:
252px;padding-top:2px;" >
</select>
</span>
</span>
|