google Chromeでjqueryとanimate()に問題があります。 私は最初は隠されていて、画面の外側の右側に配置されたボックスを持っています。 ボックスをクリックすると、隠しボックスが表示され、右から中央に移動し、停止して点滅してから、画面の左側とディサッパーに再び移動します。 これはExplorerとFirefoxでは動作しますが、Chromeでは動作しません。Jquery animate()とGoogle Chromeの問題
これはリンクです: http://test.gianlucaugolini.it/4545.html
そして、これはコードです:
function test(){
var scaleX = $("#container").width()/2 + $("#hoverText").width()/2;
$("#hoverText").animate({visibility:"visible",opacity:"show",left:"-="+scaleX+"px"},500,function(){
$("#hoverText").effect("highlight",{duration:1000},1500,function(){
$("#hoverText").animate({visibility:"hidden",opacity:"hide",left:"0%"},500,function(){
$("#hoverText").css("left","100%");
});
});
});
}
ありがとうございます!それはうまく動作します! – TheWiseJah
私は最初のCSSが "bottom:0px"を指定したが、jqueryを使って "top:+ = 2500"というようにアニメーション化するのと同じ問題がありました。 jsを "bottom: - = 2500"に変更すると一貫性があり、現在はChrome/IEで動作します。 – Heraldmonkey
の代わりに '{" padding-top ":" + = 15px "}'を使用します –