ページの読み込み時に、3 つの div を右から左にアニメーション化しようとしています。
私のHTMLはこのようなものです -
<div id="Div1"></div>
<div id="Div2"></div>
<div id="Div3"></div>
jQuery .animate を使用して試してみましたが、100% 理解できませんでした。私の問題は、右から左にアニメーション化する方法ですか?
これは私のjQueryです -
var left = $('#Div1').offset().left;
var left = $('#Div2').offset().left;
var left = $('#Div3').offset().left;
$("#Div1").css({left:left}).animate({
width: "200px",
height: "200px",
left: 0
}, {
duration: 3000,
specialEasing: {
width: "linear",
height: "easeOutBounce"
},
complete: function() {
}
});
$("#Div2").css({left:left}).animate({
width: "200px",
height: "200px",
left: 0
}, {
duration: 3000,
specialEasing: {
width: "linear",
height: "easeOutBounce"
},
complete: function() {
}
});
$("#Div3").css({left:left}).animate({
width: "200px",
height: "200px",
left: 0
}, {
duration: 3000,
specialEasing: {
width: "linear",
height: "easeOutBounce"
},
complete: function() {
}
});
これはJSFIDDLEです