JSFiddle - React, Tailwind, and code Playground
HTML
<div id="parent">
<div id="box">box</div>
</div>
<div id="height">Before display</div>
<div id="height1">After display</div>
CSS
#box {
box-sizing: border-box;
height: 40px;
border: 1px solid #000;
padding: 10px;
width: 100px;
}
#parent {
display: none;
}
JavaScript
$(document).ready(function() {
$('#height').text(parseInt($('#box').css('height')));
setTimeout(function() {
$('#parent').show();
}, 500);
setTimeout(function() {
$('#height1').text(parseInt($('#box').css('height')));
}, 1000);
});