`

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

EXT 
阅读更多

在层结点前方加入一个iframe结点<iframe class="zindexDiv" 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 class="zindexDiv" frameborder="0"></iframe>');
            });
        }
  • 大小: 914 Bytes
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics