Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
June 24, 2020 09:33 pm GMT

Hide Scrollbars During an Animation

CSS still can’t animate to auto dimensions.

.dropdown {  transition: 0.2s;  height: 0;}.dropdown.open {  /* the height will change, but it won't animate. */  height: auto;}

There is JavaScript trickery you can try. Brandon Smith outlined several techniques here a little while back. My mind always goes to this solution just because it’s so simple:

.dropdown {  transition: 0.2s;  max-height: 0;}.dropdown.open {  /* 🎉 */  max-height: 400px;}

Now we have this 400px magic number … Read article “Hide Scrollbars During an Animation”

The post Hide Scrollbars During an Animation appeared first on CSS-Tricks.


Original Link: https://css-tricks.com/hide-scrollbars-during-an-animation/

Share this article:    Share on Facebook
View Full Article

CSS Tricks

A Web Design Community curated by Chris Coyier

More About this Source Visit CSS Tricks