bootstrap CSS Image Gallery Autoplay

时间:2015-10-28 22:57:17

标签: twitter-bootstrap

我的网站上有一个小问题:http://79.115.10.208:5000/product/34b78898-9151-46a7-8f61-56ff5fa8171c.html

如果你选择了2张图片并且在选择了第一张图片之后,请隐藏全部!我尝试改变所有,whiteout解决问题。 css是bootstrap,whit jquery。

1 个答案:

答案 0 :(得分:0)

有你的问题:

<ol class="carousel-indicators">
  <div id="mini_img_produs">

    <li data-target="#carousel-example-generic" data-slide-to="0" class=""><img src="/static/uploads/27/thumb.29223794-am-pula-mare.jpg" width="111" height="80"></li>
    <li data-target="#carousel-example-generic" data-slide-to="1" class=""><img src="/static/uploads/27/thumb.75299351-am-pula-mare.jpg" width="111" height="80"></li>
    <li data-target="#carousel-example-generic" data-slide-to="2" class=""><img src="/static/uploads/27/thumb.08105532-am-pula-mare.jpg" width="111" height="80"></li>
    <li data-target="#carousel-example-generic" data-slide-to="3" class=""><img src="/static/uploads/27/thumb.01723726-am-pula-mare.jpg" width="111" height="80"></li>

  </div>
</ol>

Bootstrap将active类添加到ID为mini_img_produs的div中。你必须删除这个div。 li项必须是ul的直接子项。

将代码更改为:

<ol class="carousel-indicators">

  <li data-target="#carousel-example-generic" data-slide-to="0" class=""><img src="/static/uploads/27/thumb.29223794-am-pula-mare.jpg" width="111" height="80"></li>
  <li data-target="#carousel-example-generic" data-slide-to="1" class=""><img src="/static/uploads/27/thumb.75299351-am-pula-mare.jpg" width="111" height="80"></li>
  <li data-target="#carousel-example-generic" data-slide-to="2" class=""><img src="/static/uploads/27/thumb.08105532-am-pula-mare.jpg" width="111" height="80"></li>
  <li data-target="#carousel-example-generic" data-slide-to="3" class=""><img src="/static/uploads/27/thumb.01723726-am-pula-mare.jpg" width="111" height="80"></li>

</ol>