Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Twitter bootstrap 如何使引导转盘全屏显示(高度)?_Twitter Bootstrap_Height_Carousel - Fatal编程技术网

Twitter bootstrap 如何使引导转盘全屏显示(高度)?

Twitter bootstrap 如何使引导转盘全屏显示(高度)?,twitter-bootstrap,height,carousel,Twitter Bootstrap,Height,Carousel,我在这个网站上工作:barebands.com(所有代码都可以在那里查看)。我试图使引导转盘跨越整个屏幕高度(并将基于此自动调整内容大小)。我环顾四周看了看类似的问题,没能找到一个有效的解决方案 感谢您的帮助。添加以下CSS行,以便旋转木马图片和旋转木马容器填充用户的整个可见区域 .carousel, .item, .active { height:100%; } .carousel-inner { height:100%; } 下面是一些代码: $(docume

我在这个网站上工作:barebands.com(所有代码都可以在那里查看)。我试图使引导转盘跨越整个屏幕高度(并将基于此自动调整内容大小)。我环顾四周看了看类似的问题,没能找到一个有效的解决方案


感谢您的帮助。

添加以下CSS行,以便旋转木马图片和旋转木马容器填充用户的整个可见区域

.carousel, .item, .active { 
    height:100%;
}

.carousel-inner { 
    height:100%;
}
下面是一些代码:

    $(document).ready(function(){
    function sliderFullScreen(){
        var windowHeight = $(window).height();
        $('.main-slider').css('height',windowHeight);
        $('.main-slider .item, .main-slider .item.active').css('height',windowHeight);
        $('.main-slider .carousel-inner').css('height',windowHeight);
    }
    sliderFullScreen();
    $(window).resize(function(){
        sliderFullScreen();
    });
});
这对我有用:)


我选择了窗口的高度,并使滑块高度相同,我将其添加到一个函数中,使其响应,以便在重新调整窗口大小时重新计算。

没有将其添加到图片中,谢谢您的帮助!