I am looking to create a disappearing effect for a div by animating its size from 100% to zero. However, when I set the height in the animation, the element starts shrinking from the bottom instead of the top. Any suggestions on how to achieve this?
Here is the current code for my animation:
@-webkit-keyframes my-animation /* Safari and Chrome */
{
0%
{
opacity: 1;
height:44px; //initial element size
}
100%
{
opacity: 0;
height: 0px;
}
}
Any help would be appreciated. Thank you.