滑块图像不滑动

时间:2020-03-16 05:12:42

标签: laravel

我已经使滑块图像具有动态性,但是很遗憾,滑块图像并不仅在滑块上显示了第一张图像,而且我想知道该怎么做。是否有人有想法请帮助我。

               <div class="bd-example heroBackground ">
               <div id="carouselExampleCaptions" class="carousel slide bg-height" data- 
               ride="carousel">
               <ol class="carousel-indicators">
               <li data-target="#carouselExampleCaptions" data-slide-to="0"></li>
               <li data-target="#carouselExampleCaptions" data-slide-to="1"></li>
               <li data-target="#carouselExampleCaptions" data-slide-to="2"></li>
               </ol>
               <div class="carousel-inner heroImage  ">
               @foreach($slider as $sliders)  
               <div class="carousel-item active heroImage ">
               <div
               style="background: url({{config('e_soft.file_url').$sliders->slider_image}}) 
               center center no-repeat; background-size: cover; width: 100%; height: 100%;">
               </div>
               </div>
               @endforeach 
                </div>
                <!--end carousel-inner-->
                </div>
                <a class="carousel-control-prev icon-box" href="#carouselExampleCaptions" 
                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 icon-box" href="#carouselExampleCaptions" 
                role="button"
                data-slide="next">
                <span class="carousel-control-next-icon" aria-hidden="true"></span>
                <span class="sr-only">Next</span>
                 </a>
        </div>

控制器

          public function index()
           {
           $data=([
           'slider'=>SLiders::all(),
           'Navigation'=>Navigations::orderBy('sort_position', 'ASC')- 
           >get(),
           'services'=>Services::all(),
           'Product'=>Products::all(),
           'client'=>Clients::all(),
           'setting'=>Settings::all()
           ]);
           return view('front_end.index',$data);
           }
           }

1 个答案:

答案 0 :(得分:1)

-ComputerName