I'm trying to make an animation that involves the height property. But the animation only works if the initial height property is set, if not it the animation won't work.
This will work:
.my-class {
height: 20px;
}
.my-class:hover {
height: 560px;
}
This wont:
.my-class {
}
.my-class:hover {
height:560px;
}
And I dont want to give it an initial height. How can I make it work?