I would like to get slide down / slide up animation effect for div by pure css. I wrote something like that:
.some-class {
overflow: hidden;
max-height: 500px;
transition: max-height 0.25s ease-out;
}
.some-class:focus {
max-height: 0;
transition: max-height 0.25s ease-in;
}
and everything is fine, but I want that max-height may be unknown. When I set max-height: auto;
in some-class styles animation effect is missing. Is it possible to animate changing height of div, if I don't know its exact height?