【问题标题】:All images in bulma carousel are displayed显示 bulma carousel 中的所有图像
【发布时间】:2019-07-29 07:46:15
【问题描述】:

我正在使用 bulma-carousel 显示三张图片的幻灯片,它将 所有 三张图片显示为滑块(并排),它们可以更改为活动的,但“无活动" 图像也会显示。

<section class="section">
    <div class="container">
        <div id="post_images" class="carousel">
            <div class="item-1">
                <figure class="image is-16by9 has-ratio">
                    <img src="path/to/image"/>
                </figure>
            </div>
            <div class="item-2">
                <figure class="image is-16by9 has-ratio">
                    <img src="path/to/image"/>
                </figure>
            </div>
            <div class="item-3">
                <figure class="image is-16by9 has-ratio">
                    <img src="path/to/image"/>
                </figure>
            </div>
        </div>
    </div>
</section>
<script>
   bulmaCarousel.attach('#post_images', {
      slidesToScroll: 1,
      slidesToShow: 1,
      loop: true,
    });
</script>

我做了这个Codepen example

【问题讨论】:

    标签: carousel bulma


    【解决方案1】:

    解决方法:

    .carousel {
      overflow: hidden;
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-07-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-11-05
      • 1970-01-01
      • 2021-02-01
      相关资源
      最近更新 更多