国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 編程 > JavaScript > 正文

Bootstrap實(shí)現(xiàn)基于carousel.js框架的輪播圖效果

2019-11-19 16:40:54
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友

本文實(shí)例為大家分享了Bootstrap輪播圖效果展示的具體代碼,供大家參考,具體內(nèi)容如下

聲明式觸發(fā)需要使用到的幾個(gè)data-*屬性

1.data-ride:作用在最外層容器上,固定值:carousel
2.data-target:作用在class=carousel-indicators的每個(gè)子元素li上面,標(biāo)注對(duì)那個(gè)元素進(jìn)行點(diǎn)擊輪播
3.data-slide:作用在前翻頁(yè)和后翻頁(yè)的兩個(gè)a鏈接上,prev表示前翻頁(yè),next表示后翻頁(yè)
4.data-slide-to:作用在class=carousel-indicators的每個(gè)子元素li上面,標(biāo)注對(duì)應(yīng)的li元素對(duì)應(yīng)的圖片動(dòng)畫幀的下標(biāo),從0開(kāi)始
5.data-interval:輪番圖自動(dòng)輪播的等待時(shí)間,如果為false則不自動(dòng)輪播,默認(rèn)為5000ms
6.data-pause:指定鼠標(biāo)停留在輪換圖上是否停止輪播,離開(kāi)后繼續(xù)自動(dòng)輪播
7.data-wrap:指定是否持續(xù)輪播

輪播圖代碼實(shí)現(xiàn):

<!Doctype html><html> <head>  <title>登錄界面-bootstrap打造前端--美觀高大上-成兮制作</title>  <!-- meta -->  <meta http-equiv="viewport" content="width=device-width, initial-scale=1">  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">  <!-- ICON Link -->  <link rel="shorticon" type="image/x-icon" href="Images/webicon.ico" rel="external nofollow" rel="external nofollow" />  <link rel="icon" type='image/x-icon' href="Images/webicon.ico" rel="external nofollow" rel="external nofollow" />  <!--Bootstrap CSS Link-->  <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" rel="external nofollow" />  <link rel="stylesheet" href="bootstrap/css/bootstrap-theme.css" rel="external nofollow" />  <!-- Bootstrap JS and JQuery JS Link -->  <script src="JS/jquery.min.js"></script>  <script src="bootstrap/js/bootstrap.min.js"></script> </head> <body>  <!-- 制作巨幕輪播圖 -->  <div class="carousel" id="carouselcontainer" data-ride="carousel" style="background-color: rgba(128, 128, 128, 0.42);margin-top: 10%;width: 100%;height:658px;">   <ol class="carousel-indicators">    <li class="active" data-target="#carouselcontainer" data-slide-to="0"></li>    <li data-target="#carouselcontainer" data-slide-to='1'></li>    <li data-target="#carouselcontainer" data-slide-to="2"></li>    <li data-target="#carouselcontainer" data-slide-to="3"></li>   </ol>   <div class="carousel-inner">    <div class="item active">     <a href="javascript:void(0);" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >      <img src="Images/1.png" title="巨幕輪播圖1" style="width: 100%;height: 658px;" />     </a>    </div>    <div class="item">     <a href="javascript:void(0);" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >      <img src="Images/1.jpg" title="巨幕輪播圖2" style="width: 100%;height: 658px;" />     </a>    </div>    <div class="item">     <a href="javascript:void(0);" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >      <img src="Images/2.jpg" title="巨幕輪播圖3" style="width: 100%;height: 600px;" />     </a>    </div>    <div class="item">     <a href="javascript:void(0);" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >      <img src="Images/3.jpg" title="巨幕輪播圖4" style="width: 100%;height: 600px;" />     </a>    </div>   </div>   <div class="left carousel-control" href="#carouselcontainer" rel="external nofollow" rel="external nofollow" data-slide="prev">    <span class="glyphicon glyphicon-chevron-left"></span>   </div>   <div class="right carousel-control" href="#carouselcontainer" rel="external nofollow" rel="external nofollow" data-slide="next">    <span class="glyphicon glyphicon-chevron-right"></span>   </div>  </div> </body></html>

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持武林網(wǎng)。

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 博爱县| 龙门县| 建阳市| 科技| 准格尔旗| 阿拉善右旗| 老河口市| 清徐县| 淮南市| 乌拉特后旗| 曲阳县| 宁海县| 临城县| 阿尔山市| 淮阳县| 余江县| 论坛| 延安市| 清远市| 佛冈县| 吕梁市| 龙山县| 肇州县| 青河县| 邹平县| 新泰市| 仙桃市| 新巴尔虎右旗| 福海县| 高台县| 泰兴市| 齐河县| 佛冈县| 亚东县| 怀安县| 阳春市| 易门县| 买车| 阿图什市| 定西市| 融水|