How to Remove Delay on Css3 Slide out transition which uses max-height transition

前端 未结 3 1829
醉话见心
醉话见心 2021-02-02 17:04

I\'m having an issue with a transition I\'m using to slide a panel in and out.

Please take a look at the following jsbin http://jsbin.com/uvejuj/1/

Notice that

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-02 17:46

    It's because you're animating between 0 and 1000px max height but your content is only about 120px high. The delay is the animation happening on the 880 pixels that you can't see.

    Either set max-height to the known height of your content (if you know it - example: http://jsbin.com/onihik/1/) or try a different method. Maybe something like https://stackoverflow.com/a/6486082/2619379

提交回复
热议问题