I have encountered a unique dilemma
<div class="parent">
<p>stuff stuff stuff</p>
</div>
Using CSS, I set the width and height of parent = 0;
because I intend to modify it when a button is clicked. However, for this purpose, I must also conceal the child element with a height of 0. This is essential in creating a menu that appears closed initially.
element 1
element 2
element 3
Upon opening an element
element 1
stuf stuf
stuf stuf
stuf stuf
element 2
element 3
To achieve this effect, the height of the children should be zero and animated. While attempting to use display none, the transition appeared unattractive when revealed. Is there a more elegant approach to achieving this animation?