私は、divが特定の位置の右側に移動し、その後、下の手段に移動するデモコードを使用しています
DIV started moving------------------>
. Div turn to bottom
.
.
.
.
.
V
Div's place after move and turn
このタイプのアニメーションを作成するには、どのコードを読んで使用する必要がありますか。私は2つのコード形式を知るようになりました。デモステーション用に 2 つのコードを貼り付けています。
この問題を解決する方法:
1. $( 'span' ).animate({
// Properties of the elements to animate
opacity: 0.25,
left: '+=50'
},
{
// step is a callback for each step of the animation
step: function( now, fx ) {
// do stuff...
}
});
2. $.when($('#foo').animate({
top: 100,
left: 100
}, 3000)).pipe(function() {
return this.animate({
top: 0,
left: 0
}, 3000);
}).then(function() {
console.log('done');
});