读书人

ie6上弹出层会被覆盖bug的解决

发布时间: 2012-11-08 08:48:11 作者: rapoo

ie6下弹出层会被覆盖bug的解决

在层结点前方加入一个iframe结点<iframe frameborder="0">;

样式:.zindexDiv {
position: absolute;
z-index: -1;
width: expression(this.nextSibling.offsetWidth);
height:
expression(this.nextSibling.offsetHeight);
top:
expression(this.nextSibling.offsetTop);
left:
expression(this.nextSibling.offsetLeft);
}样式的作用在于使得iframe正好完全覆盖下一结点,注意z-index属性过高的话可能会覆盖弹出层,导致一片空白

ExtJS中的写法:

  其中subs为要弹出的层被ext封装后的对象集合,属于Class Ext.CompositeElementLite

  if(Ext.isBorderBox || Ext.isIE6) {
subs.each(function(item) {
Ext.DomHelper.insertBefore(item,'<iframe frameborder="0"></iframe>');
});
}

读书人网 >Web前端

热点推荐