最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

輕松實(shí)現(xiàn)Bootstrap圖片輪播

 更新時間:2020年04月20日 11:12:22   作者:Superpan2015  
這篇文章主要介紹了全面解析Bootstrap圖片輪播效果,Bootstrap提供了carousel插件,實(shí)現(xiàn)圖片輪播非常方便,文中示例代碼介紹的非常詳細(xì),具有一定的參考價值,感興趣的小伙伴們可以參考一下

本文實(shí)例講解了Bootstrap實(shí)現(xiàn)圖片輪播的詳細(xì)代碼,分享給大家供大家參考,具體內(nèi)容如下

具體代碼:

<!DOCTYPE html>
<html lang="en">
<head>
 <meta charset="UTF-8">
 <title>Document</title>
 <link  rel="stylesheet">
 <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
 <script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
 <style type="text/css">
 img{
 margin:0 auto;
 }
 </style>
</head>
<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="images/lunbo1.jpg" height="266" width="800" alt="...">
 <div class="carousel-caption">
 ...
 </div>
 </div>
 <div class="item">
 <img src="images/lunbo2.jpg" height="266" width="800" alt="...">
 <div class="carousel-caption">
 ...
 </div>
 </div>
 <div class="item">
 <img src="images/lunbo3.jpg" height="266" width="800" alt="...">
 <div class="carousel-caption">
 ...
 </div>
 </div>
 ...
 </div>

 <!-- Controls -->
 <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
 <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></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" aria-hidden="true"></span>
 <span class="sr-only">Next</span>
 </a>
</div>
</body>
</html>

效果

可選參數(shù)

  • data-ride=”carousel”:加上可以自動播放,不加點(diǎn)擊后才會播放。
  • 添加標(biāo)題

標(biāo)題寫在 <div class="carousel-caption"></div>之間

例如:

<div class="carousel-caption">
 <h3>果殼推書正式上線</h3>
 <p>好書分享、經(jīng)驗(yàn)交流</p>
</div>

如果大家還想深入學(xué)習(xí),可以點(diǎn)擊這里進(jìn)行學(xué)習(xí),再為大家附兩個精彩的專題:Bootstrap學(xué)習(xí)教程 Bootstrap實(shí)戰(zhàn)教程

精彩專題分享:jQuery圖片輪播 JavaScript圖片輪播

以上就是針對javascript圖片輪播進(jìn)行的詳細(xì)介紹,希望本文對大家學(xué)習(xí)javascript程序設(shè)計(jì)有所幫助。

相關(guān)文章

最新評論

武定县| 汶川县| 金坛市| 关岭| 阳新县| 湟源县| 乌拉特中旗| 公主岭市| 桂东县| 万宁市| 舟曲县| 普洱| 临沧市| 大同市| 安平县| 凤台县| 南部县| 宝丰县| 永修县| 铜陵市| 抚顺市| 澎湖县| 毕节市| 广水市| 东宁县| 紫阳县| 织金县| 敦化市| 西贡区| 广水市| 论坛| 泾川县| 许昌市| 高尔夫| 黑水县| 平原县| 延安市| 封开县| 苗栗县| 泰兴市| 衡东县|