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

前端 未结 3 1831
醉话见心
醉话见心 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:34

    Fixed JS Bin

    Fix delay solution:

    Put cubic-bezier(0, 1, 0, 1) transition function for element.

    .text {
      overflow: hidden;
      max-height: 0;
      transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
      &.full {
        max-height: 1000px;
        transition: max-height 1s ease-in-out;
    }
    

提交回复
热议问题