【问题标题】:Thumbnail Carousel - Single image sliding Showing Error. It's Sliding Full Slider缩略图轮播 - 单个图像滑动显示错误。它是滑动全滑块
【发布时间】:2017-08-08 18:27:44
【问题描述】:

我正在使用缩略图轮播 - 单个图像滑动 here,我复制完整的 Slider 并将其添加到我的网站中,但现在它可以滑动所有图像。我的网站完整代码在这里,更多查看请访问Here

我想一次只滑动一个,但是当我将它添加到我的网站时,它一次滚动完整的滑块然后显示下一张幻灯片帮助我!

$(document).ready(function () {
    $('#myCarousel').carousel({
        interval: 1000
    })
    $('.fdi-Carousel .item').each(function () {
        var next = $(this).next();
        if (!next.length) {
            next = $(this).siblings(':first');
        }
        next.children(':first-child').clone().appendTo($(this));

        if (next.next().length > 0) {
            next.next().children(':first-child').clone().appendTo($(this));
        }
        else {
            $(this).siblings(':first').children(':first-child').clone().appendTo($(this));
        }
    });
});
.carousel-inner.onebyone-carosel { margin: auto; width: 90%; }
.onebyone-carosel .active.left { left: -33.33%; }
.onebyone-carosel .active.right { left: 33.33%; }
.onebyone-carosel .next { left: 33.33%; }
.onebyone-carosel .prev { left: -33.33%; }
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link href="http://knowy.co.in/css/bootstrap.min.css" rel="stylesheet"/>
<script src="http://www.knowy.co.in/js/bootstrap.min.js"></script>
<div id="myCarousel" class="carousel fdi-Carousel slide">
 <!-- Carousel items -->
    <div class="carousel fdi-Carousel slide" id="eventCarousel" data-interval="0">
        <div class="carousel-inner onebyone-carosel">
            <div class="item active">
                <div class="col-md-4">
                    <a href="#"><img src="http://placehold.it/250x250" class="img-responsive center-block"></a>
                    <div class="text-center">1</div>
                </div>
            </div>
            <div class="item">
                <div class="col-md-4">
                    <a href="#"><img src="http://placehold.it/250x250" class="img-responsive center-block"></a>
                    <div class="text-center">2</div>
                </div>
            </div>
            <div class="item">
                <div class="col-md-4">
                    <a href="#"><img src="http://placehold.it/250x250" class="img-responsive center-block"></a>
                    <div class="text-center">3</div>
                </div>
            </div>
            <div class="item">
                <div class="col-md-4">
                    <a href="#"><img src="http://placehold.it/250x250" class="img-responsive center-block"></a>
                    <div class="text-center">4</div>
                </div>
            </div>
            <div class="item">
                <div class="col-md-4">
                    <a href="#"><img src="http://placehold.it/250x250" class="img-responsive center-block"></a>
                    <div class="text-center">5</div>
                </div>
            </div>
            <div class="item">
                <div class="col-md-4">
                    <a href="#"><img src="http://placehold.it/250x250" class="img-responsive center-block"></a>
                    <div class="text-center">6</div>
                </div>
            </div>
        </div>
        <a class="left carousel-control" href="#eventCarousel" data-slide="prev"></a>
        <a class="right carousel-control" href="#eventCarousel" data-slide="next"></a>
    </div>
    <!--/carousel-inner-->
</div><!--/myCarousel-->

【问题讨论】:

    标签: java html css spring-boot twitter-bootstrap-3


    【解决方案1】:

    您使用的是哪个版本的 Bootstrap?在 3.3.1 版本之后,Carousel 使用 CSS 转换动画。看到这个答案:Bootstrap carousel multiple frames at once

    【讨论】:

      猜你喜欢
      • 2013-10-19
      • 2016-01-09
      • 2012-08-30
      • 1970-01-01
      • 2021-03-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-10-17
      相关资源
      最近更新 更多