CSS3 equivalent to jQuery slideUp and slideDown?

前端 未结 10 1126
没有蜡笔的小新
没有蜡笔的小新 2020-12-04 08:12

My application is performing poorly with jQuery\'s slideDown and slideUp. I\'m looking to use a CSS3 equivalent in browsers which support it.

Is it possible, using C

10条回答
  •  日久生厌
    2020-12-04 08:53

        try this for slide up slide down with animation 
    give your **height
    
            @keyframes slide_up{
                from{
                    min-height: 0;
                    height: 0px;
                    opacity: 0;
                }
                to{
                    height: 560px;
                    opacity: 1;
                }
            }
    
            @keyframes slide_down{
                from{
                    height: 560px;
                    opacity: 1;
                }
                to{
                    min-height: 0;
                    height: 0px;
                    opacity: 0;
                } 
            }
    

提交回复
热议问题