7
我知道存在this問題。不幸的是,對於Bootstrap 3,建議的解決方案doesn't work(儘管它爲bs 2.3.1的does)。那麼我該怎麼做呢?如何在Bootstrap 3 Carousel上設置動畫高度變化
我知道存在this問題。不幸的是,對於Bootstrap 3,建議的解決方案doesn't work(儘管它爲bs 2.3.1的does)。那麼我該怎麼做呢?如何在Bootstrap 3 Carousel上設置動畫高度變化
有可能通過簡單的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);
});
}