在ie6 / 7中厚箱重叠不正确

时间:2011-04-22 10:08:33

标签: javascript jquery internet-explorer-7 internet-explorer-6 thickbox

您好 我正在使用带有jquery的thickbox。然而在ie6 / 7中,厚盒附带的标准css可以使用ie8和ff,但不是ie7。我尝试过一次黑客攻击,但是这种方法很有效。 (发布在下面)。会发生什么事情,如果我使用黑客它根本不会影响透明覆盖。如果我不使用黑客它只显示50%的页面透明。谁能告诉我在哪里解决这个问题?非常感谢

#TB_overlay {
    position: fixed;
    z-index:100;
    top: 0px;
    left: 0px;
    height:100%;
    width:100%;
}

#TB_overlay { position: absolute; z-index:100; top: 0px; left: 0px; background-color: #000000; filter:alpha(opacity=85); -moz-opacity: 0.7; opacity: 0.75; min-height:100%; height: auto; _height:100%; /* pour IE 6 */ height : 1px; } /* pour les autres navigateurs */ 

* > #TB_overlay { height: auto; } /* pour IE 7 */ 

*+html #TB_overlay { min-height : 1px; }

2 个答案:

答案 0 :(得分:1)

Firefox中的相同问题,但如果符合以下条件,则可以使用:

width: 100% !important;
height: 100% !important;

欢呼声

答案 1 :(得分:0)

尝试这样的事情(从fancybox的css修改):

#TB_overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 100;
    filter:alpha(opacity=85);
    -moz-opacity: 0.7;
    opacity: 0.75;
}

* html #TB_overlay {
    position: absolute;
    height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px');
}