An Interest In:
Web News this Week
- March 29, 2024
- March 28, 2024
- March 27, 2024
- March 26, 2024
- March 25, 2024
- March 24, 2024
- March 23, 2024
June 24, 2020 09:33 pm GMT
Original Link: https://css-tricks.com/hide-scrollbars-during-an-animation/
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:
Tweet
View Full Article