代码之家  ›  专栏  ›  技术社区  ›  Tom

jquery动画在IE中的行为不同

  •  2
  • Tom  · 技术社区  · 14 年前

    这个动画在Firefox中运行良好,但在IE中,它运行动画的第一部分,第一次悬停在DIV上,第二次悬停在动画的第二部分。我需要这一切同时运行。

    有什么想法吗?

    $(document).ready(function() {
    
    $("#test1").hover(
    
        function() {
            $(this).animate({
                width: "599px",
                left: "0px",
                height: "168px",
                //backgroundColor: "#d7df23",
                opacity: 0.95,
                borderWidth: "0px"
            }, 100).css("z-index", "10");
            $(this).find(".thumb").animate({
                width: "150px",
                height: "150px",
                marginTop: "8px",
                marginRight: "0px",
                marginBottom: "0px",
                marginLeft: "12px",
               borderColor: "#FFF"
            }, 100).attr('src','images/home/animatedMenu/brochureRequestIMG.jpg');
    
        }, function() {
    
    });
    
    });
    
    1 回复  |  直到 14 年前
        1
  •  2
  •   Tom    14 年前

    得到答案…

    $(document).ready(function() {
    
    $("#test1").hover(
    
        function() {
            $(this).animate({
                width: "599px",
                left: "0px",
                height: "168px",
                opacity: 0.95
            }, 100).css("z-index", "10");
            $(this).find(".thumb").animate({
                width: "150px",
                height: "150px",
                marginTop: "8px",
                marginRight: "0px",
                marginBottom: "0px",
                marginLeft: "12px"
            }, 100).attr('src','images/home/animatedMenu/brochureRequestIMG.jpg');
    
        }, function() {
    
    });
    
    });
    

    边框样式有问题…他们闯入了。