JSFiddle - React, Tailwind, and code Playground
HTML
<div class="a">
<div class="b">
<div class="box"></div>
</div>
<div class="c">
<div class="box"></div>
</div>
</div>
CSS
.box { background: red; height: 200px; width: 200px; margin: 15px; }
.a { height: 500px; width: 500px; background: blue; }
.b, .c { max-height: 0; overflow: hidden; transition: max-height 1s; transition-delay: 0; }
JavaScript
setTimeout(function () {
$(".b").css("max-height", "500px");
$(".c").css("max-height", "500px");
}, 500);
setTimeout(function () {
$(".b").css("max-height", "0");
}, 2000);