Laravel不止一个Carousel Bootstrap动态更改图像

时间:2018-11-17 06:47:22

标签: laravel carousel

我的问题是第一个旋转木马效果很好,但是第二个却没有。它不希望我单击下一个或上一个。如何动态地更改或单击一页上的图像?

  

这是我视图中的轮播代码,img src直接插入到数据库中

     <div id="carouselExampleControls" class="carousel slide" data-ride="carousel">
                            <div class="carousel-inner">
                              <div class="carousel-item active">
                                 //DATABASE IMAGE 1//   <img style="width:100%" src="/storage/cover_images/{{$post->cover_image}}">
                              </div>
                              <div class="carousel-item">
                                 //DATABASE IMAGE 2//    <img style="width:100%" src="/storage/cover_twos/{{$post->cover_two}}">
                              </div>
                              <div class="carousel-item">
                                   //DATABASE IMAGE 3//  <img style="width:100%" src="/storage/cover_threes/{{$post->cover_three}}">
                              </div>
                            </div>
                            <a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev">
                              <span class="carousel-control-prev-icon" aria-hidden="true"></span>
                              <span class="sr-only">Previous</span>
                            </a>
                            <a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next">
                              <span class="carousel-control-next-icon" aria-hidden="true"></span>
                              <span class="sr-only">Next</span>
                            </a>
                    </div> 

0 个答案:

没有答案