Bootstrap輪播圖學(xué)習(xí)使用
本文實(shí)例為大家分享了Bootstrap輪播圖的具體代碼,供大家參考,具體內(nèi)容如下
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
<link rel="stylesheet" href="css/bootstrap.css" rel="external nofollow" />
<style>
#pic{
width:900px;
margin:0 auto;
}
.carousel-caption{
color:#f00;
}
</style>
</head>
<body>
<!--carousel中文譯為輪播,旋轉(zhuǎn)木馬 slide給圖片添加運(yùn)動(dòng)效果;
data-interval是間隔時(shí)間,不能低于400否則易出問(wèn)題,單位為ms即毫秒;
data-ride="carousel為頁(yè)面一加載就開始輪播圖片
carousel-caption是在圖片上放置文字-->
<div class="container">
<div id="pic" class="carousel slide" data-interval="2000" data-ride="carousel">
<!--小圓點(diǎn)-->
<ol class="carousel-indicators">
<li class="active"></li>
<li></li>
<li></li>
<li></li>
</ol>
<!--輪播的圖片-->
<div class="carousel-inner">
<div class="item active">
<img src="images/1.jpg"/>
<div class="carousel-caption">
<h4>標(biāo)題1</h4>
<p>xxxxxxxxxxxxxxxxxxxx</p>
</div>
</div>
<div class="item">
<img src="images/2.jpg"/>
<div class="carousel-caption">
<h4>標(biāo)題2</h4>
<p>xxxxxxxxxxxxxxxxxxxx</p>
</div>
</div>
<div class="item">
<img src="images/3.jpg"/>
<div class="carousel-caption">
<h4>標(biāo)題3</h4>
<p>xxxxxxxxxxxxxxxxxxxx</p>
</div>
</div>
<div class="item">
<img src="images/4.jpg"/>
<div class="carousel-caption">
<h4>標(biāo)題4</h4>
<p>xxxxxxxxxxxxxxxxxxxx</p>
</div>
</div>
</div>
<!--左右按鈕-->
<a href="#pic" rel="external nofollow" rel="external nofollow" class="carousel-control left" data-slide="prev">‹</a>
<a href="#pic" rel="external nofollow" rel="external nofollow" class="carousel-control right" data-slide="next">›</a>
</div>
</div>
<script src="js/jquery-2.1.0.js"></script>
<script src="js/bootstrap.js"></script>
</body>
</html>
Bootstrap輪播圖的效果:

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
- 使用BootStrap進(jìn)行輪播圖的制作
- BootStrap實(shí)現(xiàn)輪播圖效果(收藏)
- 使用BootStrap建立響應(yīng)式網(wǎng)頁(yè)——通欄輪播圖(carousel)
- 利用BootStrap的Carousel.js實(shí)現(xiàn)輪播圖動(dòng)畫效果
- Bootstrap輪播圖的使用和理解4
- Bootstrap幻燈片輪播圖支持觸屏左右手勢(shì)滑動(dòng)的實(shí)現(xiàn)方法
- BootStrap實(shí)現(xiàn)手機(jī)端輪播圖左右滑動(dòng)事件
- 通過(guò)BootStrap實(shí)現(xiàn)輪播圖的實(shí)際應(yīng)用
- Bootstrap開發(fā)實(shí)戰(zhàn)之響應(yīng)式輪播圖
- Bootstrap每天必學(xué)之響應(yīng)式導(dǎo)航、輪播圖
相關(guān)文章
js實(shí)現(xiàn)導(dǎo)航欄中英文切換效果
本篇文章主要分享了javascript實(shí)現(xiàn)導(dǎo)航欄中英文切換效果的示例代碼,具有很好的參考價(jià)值,下面跟著小編一起來(lái)看下吧2017-01-01
微信小程序?qū)崿F(xiàn)自定義picker選擇器彈窗內(nèi)容
這篇文章主要為大家詳細(xì)介紹了微信小程序?qū)崿F(xiàn)自定義picker選擇器彈窗內(nèi)容,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2018-07-07
微信小程序websocket實(shí)現(xiàn)即時(shí)聊天功能
這篇文章主要為大家詳細(xì)介紹了微信小程序websocket實(shí)現(xiàn)即時(shí)聊天功能,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2019-05-05
非阻塞動(dòng)態(tài)加載javascript廣告實(shí)現(xiàn)代碼
非阻塞動(dòng)態(tài)加載javascript廣告,需要的朋友可以參考下。2010-11-11
layui的表單提交以及驗(yàn)證和修改彈框的實(shí)例
今天小編就為大家分享一篇layui的表單提交以及驗(yàn)證和修改彈框的實(shí)例,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧2019-09-09
js簡(jiǎn)單實(shí)現(xiàn)表單中點(diǎn)擊按鈕動(dòng)態(tài)增加輸入框數(shù)量的方法
這篇文章主要介紹了js簡(jiǎn)單實(shí)現(xiàn)表單中點(diǎn)擊按鈕動(dòng)態(tài)增加輸入框數(shù)量的方法,涉及javascript鼠標(biāo)點(diǎn)擊事件及insertAdjacentHTML方法的相關(guān)使用技巧,需要的朋友可以參考下2015-08-08

