【问题标题】:jQuery - Animation Causes Div Overlap IE7jQuery - 动画导致 Div 重叠 IE7
【发布时间】:2010-04-16 21:20:55
【问题描述】:

我在另一个 div 上方有一个隐藏的 div (#contactArea)。当我单击链接时,#contactArea 将打开。当我再次单击它时,它会重新关闭。这一切都很好,除了在 IE7 中。

这两个 div 是透明的,因此它们重叠。我不知道为什么会发生这种情况,或者为什么不会在其他浏览器上发生。感觉就像 IE7 在这个上是对的。

有什么办法解决这个问题?

$(document).ready(function(){ 
    $("#contactArea").css('display', 'none');

    $("a.contact").toggle(function() { 
        $("#contactArea").animate({height: "show"}, 1500, "easeOutBounce");
    }, function() {
        $("#contactArea").animate({height: "hide"}, 1500, "easeOutBounce");
    });
});

【问题讨论】:

    标签: javascript jquery internet-explorer-7 jquery-animate


    【解决方案1】:

    添加以下 CSS 规则:

    #contactArea {
        background-color: white;
    }
    

    (或其他颜色)。您可能还想添加边框。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-02-27
      • 1970-01-01
      • 2020-05-29
      • 2013-04-06
      • 1970-01-01
      • 2012-07-19
      相关资源
      最近更新 更多