How can I make a hidden element unhidden and transition?
Example:
I want to animate a <div>
that has display: none; height: 0px; transition: height 600ms;
.
So on click I add a class with display: block; height: 100px;
.
The height does not animate.
I would prefer a solution that uses transition
, but if none is available I can use animation
. I am not looking for any answers that use javascript.