Carousal - 折叠div中的自动高度(GlideJS)

时间:2017-08-17 12:52:58

标签: javascript jquery html css html5

我正在使用GlideJS来展示一个转盘。这个carousal中每个项目的高度是不同的,因此我设置了属性:

autoheight: true

问题是,当我尝试在自动高度属性设置为“true”的折叠div中显示carousal时,不会显示carousal。当autoheight属性设置为false时,carousal会显示,但项目的高度是固定的。为了说明这个问题,我创建了以下小提琴:

https://jsfiddle.net/7dma7L84/21/

如何在每个项目的自动高度折叠div中显示carousal?

2 个答案:

答案 0 :(得分:0)

我玩了一点,似乎解决了这个问题:

#Carousel {
    width: 500px;
    height: auto;
}
var carousel = $('#Carousel').glide({
    type: 'carousel',
    startAt: 1,
    touchDistance: 2,
    autoplay: 0,
    autoheight: true
});

您怎么看?

答案 1 :(得分:0)

This is not what you looking to be?

检查此图片,如果我理解正确的

,请确认我