CSS: The Bane of Display None Animations

over 3 years ago from Dan B, Crafting Meaningful Experiences

  • Dan BDan B, over 3 years ago

    Yes, the max-height animation feels a bit wonky. Especially when the content can range from 500px to 1500px, it can make the animation speed very awkward.

    Thanks for the Fiddle too Jeff! The only problem is that my content is stacked so the position absolute part doesn't really apply.

    With that said, using an animation seems to work well with a few wrapper divs to cheat the eye. You can see it on the /psychology link below on this page (I don't want to reshare the link in this thread as that'd feel spammy, also just don't share the link since I'm still dev'ing _').

    Thanks again!

    0 points
    • Jeff DoanJeff Doan, over 3 years ago

      Sure thing -- I see now; you're describing an accordion of sorts that you want to animate opening & closing, and for this JS is likely the best option here to be able to control it as crisply as you want =)

      Love your site however -- all the case studies are spot on.

      0 points