I am trying to generate an animation by moving the mouse over my div
, I want the height
to be increased to the height
it must have for its content to be fully displayed.
the effect must be from a height(height:0px)
that starts from zero to the total height(height:auto)
of the content
this is my code:
div{
height: 0px;
transition: all 0.5s ease;
overflow: hidden;
border:1px solid red;
}
div:hover{
height:auto;
}
<div>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Repellat sunt tempora, cupiditate quia labore nam quas consequuntur ducimus nemo tempore dolorem beatae voluptatem unde excepturi, error eius commodi laudantium quisquam?Lorem ipsum dolor sit amet, consectetur adipisicing elit. Doloremque quo nisi, eos impedit voluptate, molestiae repudiandae ullam deserunt magnam sed aliquam eveniet id illo qui nemo vero quis officiis, veritatis.
</div>