這篇文章主要講解了如何使用jquery輪播圖插件,內(nèi)容清晰明了,對此有興趣的小伙伴可以學(xué)習(xí)一下,相信大家閱讀完之后會有幫助。
創(chuàng)新互聯(lián)公司是專業(yè)的江海網(wǎng)站建設(shè)公司,江海接單;提供網(wǎng)站建設(shè)、成都網(wǎng)站建設(shè),網(wǎng)頁設(shè)計,網(wǎng)站設(shè)計,建網(wǎng)站,PHP網(wǎng)站建設(shè)等專業(yè)做網(wǎng)站服務(wù);采用PHP框架,可快速的進(jìn)行江海網(wǎng)站開發(fā)網(wǎng)頁制作和功能擴(kuò)展;專業(yè)做搜索引擎喜愛的網(wǎng)站,專業(yè)的做網(wǎng)站團(tuán)隊,希望更多企業(yè)前來合作!代碼
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <link rel="stylesheet" type="text/css" href="style.css" /> <script type="text/javascript" src="jQuery.js"></script> <script type="text/javascript" src="carousel.js"></script> <script type="text/javascript"> $(function(){ $(".carousel-content").carousel({ carousel : ".carousel",//輪播圖容器 indexContainer : ".img-index",//下標(biāo)容器 prev : ".carousel-prev",//左按鈕 next : ".carousel-next",//右按鈕 timing : 2000,//自動播放間隔 animateTime : 700,//動畫時間 autoPlay : true,//是否自動播放 true/false direction : "left",//滾動方向 right/left }); $(".carousel-content").hover(function(){ $(".carousel-prev,.carousel-next").fadeIn(300); },function(){ $(".carousel-prev,.carousel-next").fadeOut(300); }); $(".carousel-prev").hover(function(){ $(this).find("img").attr("src","img/left2.png"); },function(){ $(this).find("img").attr("src","img/left1.png"); }); $(".carousel-next").hover(function(){ $(this).find("img").attr("src","img/right2.png"); },function(){ $(this).find("img").attr("src","img/right1.png"); }); }); </script> </head> <body> <div class="content"> <div class="a-content"> <div class="carousel-content"> <ul class="carousel"> <li><img src="img/1.jpg"></li> <li><img src="img/2.jpg"></li> <li><img src="img/3.jpg"></li> <li><img src="img/4.jpg"></li> <li><img src="img/5.jpg"></li> </ul> <ul class="img-index"></ul> <div class="carousel-prev"><img src="img/left1.png"></div> <div class="carousel-next"><img src="img/right1.png"></div> </div> </div> </div> </body> </html>
文章名稱:如何使用jquery輪播圖插件-創(chuàng)新互聯(lián)
當(dāng)前網(wǎng)址:http://chinadenli.net/article34/cdpppe.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供虛擬主機、微信小程序、網(wǎng)站導(dǎo)航、App設(shè)計、微信公眾號、定制網(wǎng)站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容