ric*_*ins 5 carousel twitter-bootstrap
这个旋转木马看起来非常简单,但我不能让它工作
任何帮助非常感谢:-)
看到它有帮助:http://www.bootply.com/70201
它使用Bootstrap 3,直接从Bootstrap docs和javascript 上的carousel示例中取出HTML
<script type="text/javascript" >
$(document).ready(function() {
$('.carousel').carousel()
});
</script>
Run Code Online (Sandbox Code Playgroud)
我还注意到,我的占位符图像的来源目前还没有,所以我正在使用另一个URL作为幻灯片图像
Goold运气好!
HTML
<div id="carousel-example-generic" class="carousel slide">
<!-- 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>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active">
<img src="http://placehold.it/900x500" alt="">
<div class="carousel-caption">
slide 1
</div>
</div>
<div class="item">
<img src="http://placehold.it/900x500" alt="">
<div class="carousel-caption">
slide 2
</div>
</div>
<div class="item">
<img src="http://placehold.it/900x500" alt="">
<div class="carousel-caption">
slide 3
</div>
</div>
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
<span class="icon-prev"></span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
<span class="icon-next"></span>
</a>
</div>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
30562 次 |
| 最近记录: |