I'm trying to get a div to expand from the top of the page to the bottom. When users click button then animation starts the div will be hidden (height 0%), till it fills its content. I tried to do it like so, but none of it seems to be working.
CSS and HTML
<div class="container">
<h1>Lorem Ipsum</h1>
<h1>Lorem Ipsum</h1>
<h1>Lorem Ipsum</h1>
<h1>Lorem Ipsum</h1>
<h1>Lorem Ipsum</h1>
<h1>Lorem Ipsum</h1>
<h1>Lorem Ipsum</h1>
<h1>Lorem Ipsum</h1>
</div>
<button type="button" id="expand">Expand</button>
.container{
background:lightblue;
top: 0px;
left: 0px;
width: 100%;
display: block;
height:0px;
overflow:hidden;
}