0
$(document).ready(function(){
$('.boxgrid.slidedown').hover(function(){
    $(".cover", this).stop().animate({opacity:'0'},{queue:false,duration:300});
}, function() {
    $(".cover", this).stop().animate({opacity:'1'},{queue:false,duration:300});
    });

    //Full Caption Sliding (Hidden to Visible)
    $('.boxgrid.captionfull').hover(function(){
    $(".cover", this).stop().animate({opacity:'1'},{queue:false,duration:250});
    }, function() {
    $(".cover", this).stop().animate({opacity:'0'},{queue:false,duration:250});
    });
});

画像にホバー効果を追加します。IE8 では、.cover div が既に最初に表示されています。なぜですか?

4

1 に答える 1

0

最初に css add.cover {display:none}で、fadeIn/fadeOut を使用してみましたか

$(document).ready(function(){
    //Full Caption Sliding (Hidden to Visible)
    $('.boxgrid.captionfull').hover(function(){
    $(".cover", this).fadeIn(250);
    }, function() {
    $(".cover", this).fadeOut(250);
    });
});

.stop() を追加したい場合は、少し調整できます

于 2013-06-20T10:12:21.663 に答える