<div class="carousel"> <div class="carousel-inner"> <div class="carousel-item active"><a href=""><img src="static/picture/a.jpg"></a></div> <div class="carousel-item"><a href=""><img src="static/picture/b.jpg"></a></div> <div class="carousel-item"><a href=""><img src="static/picture/c.jpg"></a></div> </div> </div>
<div class="carousel" data-arrow="false" data-time="3" data-way="fade" data-flash="true"> <div class="carousel-inner"> <div class="carousel-item active"><a><img src="static/picture/a.jpg" data-title="每个人都有一个死角, 自己走不出来,别人也闯不进去。111111"></a></div> <div class="carousel-item"><a><img src="static/picture/b.jpg" data-title="我把最深沉的秘密放在那里。22222"></a></div> <div class="carousel-item"><a><img src="static/picture/c.jpg" data-title="每个人都有一道伤口, 或深或浅,盖上布,以为不存在。33333"></a></div> </div> </div>
<div style="width:640px;margin:20px auto;"> <div class="carousel" data-arrow="false" data-time="3" data-page="true"> <div class="carousel-inner"> <div class="carousel-item active"><a><img src="static/picture/a.jpg"></a></div> <div class="carousel-item"><a><img src="static/picture/b.jpg"></a></div> <div class="carousel-item"><a><img src="static/picture/c.jpg"></a></div> </div> </div> </div>
参数说明
参数 说明
data-arrow 是否显示左右箭头
data-time 轮播时间间隔,单位:秒
data-way 轮播方式,默认左右切换,fade:为淡入淡出
data-flash flash模式,通常用于内部图片切换