Is there a way to animate the display property from block to none and vice versa?
I want to create an animation where clicking on div1
animates div 2, and clicking on div4
animates div 3. I would like these animations to include smooth transitions while keeping them within a flex container.
So far, I have been able to animate visibility and opacity, but when using display none, divs 2 and 3 still take up space within the container. Alternatively, switching between display block and none loses the transition effect.
I attempted positioning the inner divs absolutely, but this caused responsiveness issues.
Check out my CodePen for reference: http://codepen.io/adamTrz/pen/jWOJMj