亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

通過BootStrap實(shí)現(xiàn)輪播圖的實(shí)際應(yīng)用

 更新時間:2016年09月26日 08:47:17   作者:羅先森  
js我們沒有學(xué)過,今天我是用bootstrap實(shí)現(xiàn)輪播圖的效果,非常不錯代碼簡單易懂,需要的朋友參考下吧

 我是用bootstrap來做的很簡單

直接把那坨代碼復(fù)制到 webstorm里面

下面我會用我的某一次作業(yè) 來做實(shí)際解釋里面的某部分各代表什么意思

(由于這個代碼到底什么意思 老師沒有教過 我自行理解 有錯的地方 望海涵)

“男友秋裝上新”這個地方 就是個輪播 一共3個小點(diǎn) 也就是三張圖 可通過左右的箭頭 左右翻動

接下來 奉上源代碼:并在代碼后給各部分做出解釋

 <div class="col-md-9 lunbo"> 
 <div id="carousel-example-generic" class="carousel slide" data-ride="carousel" style="margin-top: 1.4285rem">  
 <!-- Indicators -->  
 <ol class="carousel-indicators" style="margin-left: -20rem">   
 <li data-target="#carousel-example-generic" data-slide-to="0" class="active">
 </li>  
 這里規(guī)定播放順序 3個li代表3個小點(diǎn) 點(diǎn)一個小點(diǎn) 就是一張圖   
 <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"> 這里是要播放的圖 3張   
 <div class="item active">這里的active 對應(yīng)上面active的那個小圓點(diǎn)    
 <img src="三組項(xiàng)目/PC/PC首頁/lunbo1.jpg" alt="..." style="width: 64rem;height: 31.9285rem">    
 <div class="carousel-caption"></div>   
 </div>   
 <div class="item">    
 <img src="三組項(xiàng)目/PC/PC首頁/lunbo2.jpg" alt="..."style="width: 64rem;height: 31.9285rem">    
 <div class="carousel-caption"></div>   
 </div>   
 <div class="item">    
 <img src="三組項(xiàng)目/PC/PC首頁/lunbo3.jpg" alt="..."style="width: 64rem;height: 31.9285rem">    
 <div class="carousel-caption"></div>   
 </div>  
 </div>  
 <!-- Controls --> 這里就是那左右兩個箭頭  
 <a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">上翻   
 <span class="glyphicon glyphicon-chevron-left"></span>  
 </a>  
 <a class="right carousel-control" href="#carousel-example-generic" data-slide="next">下翻   
 <span class="glyphicon glyphicon-chevron-right"></span>  
 </a> 
 </div>
 </div> 

如果只需兩個圖 那么就自己改代碼 刪除一個圖片 一個圓點(diǎn) 并改好圓點(diǎn)那里

data-slide-to="0" 里面的數(shù)字 這里的0 只是舉例數(shù)字 具體情況 自行判斷

以上所述是小編給大家介紹的通過BootStrap實(shí)現(xiàn)輪播圖的實(shí)際應(yīng)用,希望對大家有所幫助,如果大家有任何疑問歡迎給我留言,小編會及時回復(fù)大家的!

相關(guān)文章

最新評論