为什么我的靴子旋转木马导航无法正常工作?

时间:2016-07-15 15:28:28

标签: css navigation carousel

   <div class="carousel slide ">
    <div class="carousel-inner " data-ride="carousel" id="featured"> 
     <div class="item active">   
         <img src="images/carousel-lifestyle.jpg" alt="Lifestyle Photo">
     </div>
     <div class="item">  
         <img src="images/carousel-mission.jpg" alt="Mission">
     </div>
      <div class="item">
         <img src="images/carousel-vaccinations.jpg" alt="Vaccinations">
      </div>
      <div class="item">
         <img src="images/carousel-fish.jpg" alt="Fish">
      </div>
      <div class="item">
         <img src="images/carousel-exoticanimals.jpg" alt="Exotic Animals">
      </div>



  <a href="#featured" class="left carousel-control" data-slide="prev" role="button">
      <span class="glyphicon glyphicon-chevron-left"></span> <!--Previous button-->
  </a>
  <a href="#featured" class="right carousel-control" data-slide="next" role="button">
      <span class="glyphicon glyphicon-chevron-right"></span> <!-- Next button-->
  </a>
  </div>      
</div>

下一个和上一个导航按钮不起作用,但它们在屏幕上显而易见 我无法弄清楚为什么我的旋转木马的导航无法正常工作。

1 个答案:

答案 0 :(得分:2)

您的转盘缺少$ while read line; do echo $line | fold -w1 | xargs; done < file 3 1 3 1 3 3 0 4 4 2 1 1 0 2 0 1 2 3 2 4 0 0 1 4 0 3 4 2 2 3 3 4 2 2 1 4 3 1 2 4 1 2 2 1 1 0 4 3 1 2

id

您的导航链接引用了<a href="#featured" class="left carousel-control" data-slide="prev" role="button"> 的元素,但它不在您的标记中的任何位置。

添加id="featured"作为ID以使滑块正常工作:

featured

&#13;
&#13;
<div id="featured" class="carousel slide">
//-------^^^^^^^^ this missing id causing your slider to not work properly.
&#13;
&#13;
&#13;