使用BootStrap進(jìn)行輪播圖的制作
Bootstrap 輪播(Carousel)插件是一種靈活的響應(yīng)式的向站點(diǎn)添加滑塊的方式。除此之外,內(nèi)容也是足夠靈活的,可以是圖像、內(nèi)嵌框架、視頻或者其他您想要放置的任何類型的內(nèi)容。
<!DOCTYPE html> <html lang="zh-cn"> <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" /> </head> <style> .carousel { height: 500px; } .carousel .item { height: 500px; } .carousel .item img { width: 100%; } </style> <body> <div id="carousel-example-generic" class="carousel slide" data-ride="carousel"> <!-- Indicators輪播指標(biāo) --> <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 輪播項(xiàng)目--> <div class="carousel-inner" role="listbox"> <div class="item active"> <img src="http://img.mukewang.com/5412ad400001e52014280484.jpg" alt="..."> <div class="carousel-caption"> 11 英寸 MacBook Air 充電一次可運(yùn)行長達(dá) 9 小時(shí),而 13 英寸機(jī)型則可運(yùn)行長達(dá) 12 小時(shí)。 </div> </div> <div class="item"> <img src="http://img.mukewang.com/5412ad7c0001d2eb10880541.jpg" alt="..."> <div class="carousel-caption"> 無論是什么任務(wù),配備 Intel HD Graphics 5000 圖形處理器的第四代 Intel Core 處理器都能應(yīng)對(duì)自如。 </div> </div> <div class="item"> <img src="http://img.mukewang.com/5412ae5c0001653b12800644.jpg" alt="..."> <div class="carousel-caption"> 有了新一代 802.11ac 技術(shù),MacBook Air 令 Wi-Fi 速度超越極限。 </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> <script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> </body> </html>
以上所述是小編給大家介紹的使用BootStrap進(jìn)行輪播圖的制作,希望對(duì)大家有所幫助,如果大家有任何疑問請給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!
- 利用BootStrap的Carousel.js實(shí)現(xiàn)輪播圖動(dòng)畫效果
- BootStrap實(shí)現(xiàn)輪播圖效果(收藏)
- 使用BootStrap建立響應(yīng)式網(wǎng)頁——通欄輪播圖(carousel)
- Bootstrap輪播圖的使用和理解4
- Bootstrap幻燈片輪播圖支持觸屏左右手勢滑動(dòng)的實(shí)現(xiàn)方法
- BootStrap實(shí)現(xiàn)手機(jī)端輪播圖左右滑動(dòng)事件
- 通過BootStrap實(shí)現(xiàn)輪播圖的實(shí)際應(yīng)用
- Bootstrap開發(fā)實(shí)戰(zhàn)之響應(yīng)式輪播圖
- Bootstrap每天必學(xué)之響應(yīng)式導(dǎo)航、輪播圖
- Bootstrap實(shí)現(xiàn)基于carousel.js框架的輪播圖效果
相關(guān)文章
如何利用JavaScript讀取excel文件并繪制echarts圖形
這篇文章主要介紹了如何利用JavaScript讀取excel文件并繪制echarts圖形,文章通過excel財(cái)務(wù)報(bào)表,并且需要根據(jù)這張excel表繪制成各種echarts圖形,需要了解更多詳情的小伙伴可以參考一下文章內(nèi)內(nèi)容2022-05-05元素未顯示設(shè)置width/height時(shí)IE中使用currentStyle獲取為auto
元素未顯示設(shè)置width/height時(shí)IE中無法使用currentStyle獲取,默認(rèn)獲取值為auto,需要的朋友可以參考下2014-05-05javascript 如何生成不重復(fù)的隨機(jī)數(shù)
javascript 如何生成不重復(fù)的隨機(jī)數(shù)...2007-11-11JavaScript實(shí)現(xiàn)帶箭頭標(biāo)識(shí)的多級(jí)下拉菜單效果
這篇文章主要介紹了JavaScript實(shí)現(xiàn)帶箭頭標(biāo)識(shí)的多級(jí)下拉菜單效果,可實(shí)現(xiàn)橫向與縱向箭頭的形式標(biāo)識(shí)選中菜單項(xiàng)位置的功能,涉及javascript針對(duì)頁面元素位置的判定與樣式動(dòng)態(tài)操作技巧,需要的朋友可以參考下2015-08-08js中document.write和document.writeln的區(qū)別
這篇文章主要介紹了js中document.write和document.writeln的區(qū)別,需要的朋友可以參考下2018-03-03