Bootstrap Carousel (Carousel) Picture vertical Display the problem solving method that cannot be carousel

Source: Internet
Author: User
Tags smarty template bootstrap carousel

This is always the case, the picture is displayed vertically and the problem of carousel cannot be left or right.


It was later discovered that the problem was.

  <!--Carousel (Carousel) Items--               <div class= "Carousel-inner" >                  <div class= "Item Active" >                     < IMG src= ". /.. /.. /web/images/testcar1.jpg "alt=" front photo ">                     <div class=" carousel-caption "> Front photo </div>                  </div>                  <div class= "Item" >                                          <div class= "Carousel-caption" > in-control photo </div>                  </div>                  <div class= "Item" >                                          <div class=" carousel-caption "> Back photo </div>                  </div >               </div>

There must be a class that is "Item active", and if it is all "item" The problem will occur. And for me to use the Smarty template, I have to believe adding some logic judgment.

<!--Carousel (Carousel) Items--               <div class= "Carousel-inner" style= "height:450px" >                {$index =0}                { foreach $b as $c}                  {if $index = = 0}                  <div class= "Item Active" >                                          < Div class= "carousel-caption" ></div>                  </div>                  {else if}                  <div class= "Item" >                                          <div class= "carousel-caption" ></div>                  </div>                  {/if }                  {$index = $index +1}                {/foreach}               </div>


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Bootstrap Carousel (Carousel) Picture vertical Display the problem solving method that cannot be carousel

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.