March 10, 2017 01:47 pm GMT
Original Link: https://css-tricks.com/using-css-transitions-auto-dimensions/
Using CSS Transitions on Auto Dimensions
We've all been there. You've got an element you want to be able to collapse and expand smoothly using CSS transitions, but its expanded size needs to be content-dependent. You've set transition: height 0.2s ease-out
. You've created a collapsed
CSS class that applies height: 0
. You try it out, and... the height doesn't transition. It snaps between the two sizes as if transition
had never been set. After some fiddling, you figure out that this problem only happens …
Using CSS Transitions on Auto Dimensions is a post from CSS-Tricks
Original Link: https://css-tricks.com/using-css-transitions-auto-dimensions/
Share this article:
Tweet
View Full Article