2014-03-25 62 views

回答

17

有可能通過簡單的JavaScript的代碼片段解決這個問題:

function bsCarouselAnimHeight() 
{ 
    $('.carousel').carousel({ 
     interval: 5000 
    }).on('slide.bs.carousel', function (e) 
    { 
     var nextH = $(e.relatedTarget).height(); 
     $(this).find('.active.item').parent().animate({ height: nextH }, 500); 
    }); 
}