0
現在、div
をある場所から別の場所に移動していますが、いくつかのアニメーションでそれをやりたいのです。スライドさせて、もう一方のdivs
を押し下げてください。これをどうやってやりますか?アニメーションを使用してdivを移動する方法
これまで私がこれまで持っていたことは次のとおりです。
var row = $('<div class="row">Another row inserted</div>');
$('.container').append(row);
$('.button').click(function() {
\t $('.row').addClass('row-changed');
\t $('.container > div:nth-child(2)').after(row);
});
.row {
color: blue;
}
.row-changed {
color: red;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class='container'>
<button class='button'>Move</button>
<div class='row'>Row here</div>
<div class='row'>Row here</div>
<div class='row'>Row here</div>
<div class='row'>Row here</div>
<div class='row'>Row here</div>
</div>
いわゆる "FLIP" の方法を試してみてください。 https://aerotwist.com/blog/flip-your-animations/ – gcampbell