jQuery fadeOut without display none?

后端 未结 6 909
死守一世寂寞
死守一世寂寞 2020-12-08 03:54

Is there an alternative to fadeOut() that doesn\'t use display:none for the style? I\'d like to just use visibility hidden to avoid any sort of shifting in the page layout?

6条回答
  •  生来不讨喜
    2020-12-08 04:32

    Custom animation is an alternative http://api.jquery.com/animate/

    .animate({opacity: 0.0}, 5000, 'linear', callback);
    

提交回复
热议问题