bootstrap圖片自動(dòng)輪播效果圖:

代碼實(shí)現(xiàn):
<!DOCTYPE html><html lang="zh-CN"><head> <link rel="stylesheet" href="bootstrap.min.css" /> <link rel="stylesheet" href="bootstrap-theme.min.css" /> <script src="jquery.min.js"></script> <script src="bootstrap.min.js"></script> <style> #div1 {width:600px; height:500px} </style></head><body> <div id="div1"> <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="airplane1.jpg" > </div> <div class="item"> <img src="airplane2.jpg" > </div> <div class="item"> <img src="airplane3.jpg" > </div> </div> <!-- Controls --> <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev"> <span class="glyphicon glyphicon-chevron-left" id="aaron1"></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" id="aaron2"></span> <span class="sr-only">Next</span> </a> </div> </div></body><html>精彩專題分享:jQuery圖片輪播 JavaScript圖片輪播
如果大家還想深入學(xué)習(xí),可以點(diǎn)擊這里進(jìn)行學(xué)習(xí),再為大家附3個(gè)精彩的專題:
以上代碼可以實(shí)現(xiàn) div1 中的圖片自動(dòng)輪播,輪播時(shí)間默認(rèn)5000ms。
以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持武林網(wǎng)。
新聞熱點(diǎn)
疑難解答
圖片精選
網(wǎng)友關(guān)注