使用BootStrap進行輪播圖的制作
更新時間:2017年01月06日 09:16:22 作者:bobo1356
Bootstrap 輪播(Carousel)插件是一種靈活的響應式的向站點添加滑塊的方式。這篇文章主要介紹了使用BootStrap進行輪播圖的制作的相關資料,需要的朋友可以參考下
Bootstrap 輪播(Carousel)插件是一種靈活的響應式的向站點添加滑塊的方式。除此之外,內(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輪播指標 -->
<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 輪播項目-->
<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 充電一次可運行長達 9 小時,而 13 英寸機型則可運行長達 12 小時。
</div>
</div>
<div class="item">
<img src="http://img.mukewang.com/5412ad7c0001d2eb10880541.jpg" alt="...">
<div class="carousel-caption">
無論是什么任務,配備 Intel HD Graphics 5000 圖形處理器的第四代 Intel Core 處理器都能應對自如。
</div>
</div>
<div class="item">
<img src="http://img.mukewang.com/5412ae5c0001653b12800644.jpg" alt="...">
<div class="carousel-caption">
有了新一代 802.11ac 技術,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進行輪播圖的制作,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對腳本之家網(wǎng)站的支持!
您可能感興趣的文章:
- 利用BootStrap的Carousel.js實現(xiàn)輪播圖動畫效果
- BootStrap實現(xiàn)輪播圖效果(收藏)
- 使用BootStrap建立響應式網(wǎng)頁——通欄輪播圖(carousel)
- Bootstrap輪播圖的使用和理解4
- Bootstrap幻燈片輪播圖支持觸屏左右手勢滑動的實現(xiàn)方法
- BootStrap實現(xiàn)手機端輪播圖左右滑動事件
- 通過BootStrap實現(xiàn)輪播圖的實際應用
- Bootstrap開發(fā)實戰(zhàn)之響應式輪播圖
- Bootstrap每天必學之響應式導航、輪播圖
- Bootstrap實現(xiàn)基于carousel.js框架的輪播圖效果
相關文章
如何利用JavaScript讀取excel文件并繪制echarts圖形
這篇文章主要介紹了如何利用JavaScript讀取excel文件并繪制echarts圖形,文章通過excel財務報表,并且需要根據(jù)這張excel表繪制成各種echarts圖形,需要了解更多詳情的小伙伴可以參考一下文章內(nèi)內(nèi)容2022-05-05
元素未顯示設置width/height時IE中使用currentStyle獲取為auto
元素未顯示設置width/height時IE中無法使用currentStyle獲取,默認獲取值為auto,需要的朋友可以參考下2014-05-05
JavaScript實現(xiàn)帶箭頭標識的多級下拉菜單效果
這篇文章主要介紹了JavaScript實現(xiàn)帶箭頭標識的多級下拉菜單效果,可實現(xiàn)橫向與縱向箭頭的形式標識選中菜單項位置的功能,涉及javascript針對頁面元素位置的判定與樣式動態(tài)操作技巧,需要的朋友可以參考下2015-08-08
js中document.write和document.writeln的區(qū)別
這篇文章主要介紹了js中document.write和document.writeln的區(qū)別,需要的朋友可以參考下2018-03-03

