Bootstrap輪播圖學習使用
更新時間:2017年02月10日 08:44:10 作者:輕擾時光
這篇文章主要為大家詳細介紹了Bootstrap輪播圖學習使用的相關資料,具有一定的參考價值,感興趣的小伙伴們可以參考一下
本文實例為大家分享了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給圖片添加運動效果; data-interval是間隔時間,不能低于400否則易出問題,單位為ms即毫秒; data-ride="carousel為頁面一加載就開始輪播圖片 carousel-caption是在圖片上放置文字--> <div class="container"> <div id="pic" class="carousel slide" data-interval="2000" data-ride="carousel"> <!--小圓點--> <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>標題1</h4> <p>xxxxxxxxxxxxxxxxxxxx</p> </div> </div> <div class="item"> <img src="images/2.jpg"/> <div class="carousel-caption"> <h4>標題2</h4> <p>xxxxxxxxxxxxxxxxxxxx</p> </div> </div> <div class="item"> <img src="images/3.jpg"/> <div class="carousel-caption"> <h4>標題3</h4> <p>xxxxxxxxxxxxxxxxxxxx</p> </div> </div> <div class="item"> <img src="images/4.jpg"/> <div class="carousel-caption"> <h4>標題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輪播圖的效果:
以上就是本文的全部內(nèi)容,希望對大家的學習有所幫助,也希望大家多多支持腳本之家。
相關文章
微信小程序?qū)崿F(xiàn)自定義picker選擇器彈窗內(nèi)容
這篇文章主要為大家詳細介紹了微信小程序?qū)崿F(xiàn)自定義picker選擇器彈窗內(nèi)容,文中示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下2018-07-07非阻塞動態(tài)加載javascript廣告實現(xiàn)代碼
非阻塞動態(tài)加載javascript廣告,需要的朋友可以參考下。2010-11-11js簡單實現(xiàn)表單中點擊按鈕動態(tài)增加輸入框數(shù)量的方法
這篇文章主要介紹了js簡單實現(xiàn)表單中點擊按鈕動態(tài)增加輸入框數(shù)量的方法,涉及javascript鼠標點擊事件及insertAdjacentHTML方法的相關使用技巧,需要的朋友可以參考下2015-08-08