Bootstrap轮播下一个和上一个徽标doesent出现

时间:2017-07-25 18:43:56

标签: jquery css twitter-bootstrap

我正在尝试使用旋转木马,但是下一个和之前的徽标都没有出现。

Like in this image.

    <!--Slide start -->


<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
  <!-- Indicators -->
  <ol class="carousel-indicators">
    <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
    <li data-target="#carousel-example-generic" data-slide-to="1"></li>
    <li data-target="#carousel-example-generic" data-slide-to="2"></li>
    <li data-target="#carousel-example-generic" data-slide-to="3"></li>
  </ol>

  <!-- Wrapper for slides -->
  <div class="carousel-inner" role="listbox">
    <div class="item active">
      <img src="img/sampleslide.png" alt="Açıklama">
      <div class="carousel-caption">
        Lorem ipsum dolor sit amet, consectetur adipisicing elit. Laboriosam dolorem corporis distinctio fuga modi provident facilis quod, quis totam temporibus fugit commodi? Vero magnam cupiditate est eveniet, ipsam quo consectetur.
      </div>
    </div>
    <div class="item">
      <img src="img/sampleslide.png" alt="...">
      <div class="carousel-caption">
        Lorem ipsum dolor sit amet, consectetur adipisicing elit. Non dolor cum, suscipit reprehenderit voluptates sint fugiat eveniet iure in, sequi recusandae repellendus laborum aut obcaecati? Ducimus laborum nulla natus fugiat.
      </div>
    </div>

    <div class="item">
      <img src="img/sampleslide.png" alt="...">
      <div class="carousel-caption">
        Lorem ipsum dolor sit amet, consectetur adipisicing elit. Non dolor cum, suscipit reprehenderit voluptates sint fugiat eveniet iure in, sequi recusandae repellendus laborum aut obcaecati? Ducimus laborum nulla natus fugiat.
      </div>
    </div>

    <div class="item">
      <img src="img/sampleslide.png" alt="...">
      <div class="carousel-caption">
        Lorem ipsum dolor sit amet, consectetur adipisicing elit. Non dolor cum, suscipit reprehenderit voluptates sint fugiat eveniet iure in, sequi recusandae repellendus laborum aut obcaecati? Ducimus laborum nulla natus fugiat.
      </div>
    </div>

  </div>


  <!-- Controls -->
  <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
    <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
    <span class="sr-only">Previous</span>
    </a>
  <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
    <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
    <span class="sr-only">Next</span>
    </a>
</div>

这些是我的控制代码。它有什么问题吗? 这是我的整个代码:https://pastebin.com/KKYx3yBF

1 个答案:

答案 0 :(得分:0)

我发现了问题。因为如果你只是包含bootstrap CDN那么它们就不会出现了。所以你应该把这个链接包含在html文件中。

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css" rel="stylesheet">