這篇文章給大家分享的是有關(guān)如何引用bootstrap輪播圖的內(nèi)容。小編覺(jué)得挺實(shí)用的,因此分享給大家做個(gè)參考,一起跟隨小編過(guò)來(lái)看看吧。
提示:這些功能都是需要插件支持的,既然是bootstrap當(dāng)然不能少它的css和js文件的引入,另外還有JQuery.js,他們的版本都在3.0以上就可以了!!
1.直接引用bootstrap里的類carousel slide
做一個(gè)div容器;
2.ul標(biāo)簽 添加類carousel-indicators
做相應(yīng)個(gè)數(shù)的圖像選擇器,就是那些小圓點(diǎn)!
3.再做一個(gè)div容器加類carousel-inner
包裹圖片;
4.接下來(lái)創(chuàng)建一個(gè)個(gè)的圖片項(xiàng)目包裹在div 類item中,在里面如果還需要對(duì)圖片做其他說(shuō)明就繼續(xù)加div 類carousel-caption
添加文字說(shuō)明;
5.最后一步是添加圖片左右控制,a標(biāo)簽 添加標(biāo)簽類left carousel-control
和 類right-carousel-control
分別設(shè)置左右的控制鍵;
選取要跳轉(zhuǎn)的id#carousel-example-generic
,data-slide=“l(fā)eft”/“right”
;
里面加上左右控制鍵顯示的圖片icon,這個(gè)可以引用 類glyphicon glyphicon-chevron-right
和glyphicon glyphicon-chevron-left
,自己也可以做啊,相信自己的審美 -^ .^-
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel"> <!-- Indicators --> <ul 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> </ul> <!-- Wrapper for slides --> <div class="carousel-inner" role="listbox"> <div class="item active"><img class="img-responsive" src="img/0e4eb42dd4acd3aff05b1fee14820af0.jpg"/><div class="carousel-caption"> <h2>輪播1的標(biāo)題</h2> <p>這里是輪播圖1的說(shuō)明</p> </div> </div> <div class="item"><img class="img-responsive" src="img/2fc4c4554273a93933af18f8a4239275.jpg"/><div class="carousel-caption"> <h2>輪播2的標(biāo)題</h2> <p>這里是輪播圖2的說(shuō)明</p></div></div> <div class="item"><img class="img-responsive" src="img/28058504efd74a112e721e048e38aeb9.jpg"/><div class="carousel-caption"><h2>輪播3的標(biāo)題</h2><p>這里是輪播圖3的說(shuō)明</p></div> </div> </div> <!-- Controls --> <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev"> <span class="glyphicon glyphicon-chevron-left"></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"></span><span class="sr-only">Next</span></a></div>
感謝各位的閱讀!關(guān)于“如何引用bootstrap輪播圖”這篇文章就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,讓大家可以學(xué)到更多知識(shí),如果覺(jué)得文章不錯(cuò),可以把它分享出去讓更多的人看到吧!
網(wǎng)站名稱:如何引用bootstrap輪播圖-創(chuàng)新互聯(lián)
文章位置:http://chinadenli.net/article4/dcjhie.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供商城網(wǎng)站、外貿(mào)建站、網(wǎng)站設(shè)計(jì)公司、App設(shè)計(jì)、服務(wù)器托管、企業(yè)建站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容