首页 > 代码库 > jQuery补充,基于jQuery的bxslider轮播器插件
jQuery补充,基于jQuery的bxslider轮播器插件
基于jQuery的bxslider轮播器插件
html
<!DOCTYPE html> <html lang="zh-cn"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no"> <title>bxslider介绍</title> <!--引入bxslider样式文件--> <link rel="stylesheet" href="bxslider/jquery.bxslider.min.css"> </head> <body> <!--普通轮播图--> <ul class="bxslider"> <li><img src="http://placehold.it/350x150&text=FooBar1"/></li> <li><img src="http://placehold.it/350x150&text=FooBar2"/></li> <li><img src="http://placehold.it/350x150&text=FooBar3"/></li> </ul> <!--横向旋转木马轮播--> <div class="slider1"> <div class="slide"><img src="http://placehold.it/350x150&text=FooBar1"></div> <div class="slide"><img src="http://placehold.it/350x150&text=FooBar2"></div> <div class="slide"><img src="http://placehold.it/350x150&text=FooBar3"></div> <div class="slide"><img src="http://placehold.it/350x150&text=FooBar4"></div> <div class="slide"><img src="http://placehold.it/350x150&text=FooBar5"></div> <div class="slide"><img src="http://placehold.it/350x150&text=FooBar6"></div> <div class="slide"><img src="http://placehold.it/350x150&text=FooBar7"></div> <div class="slide"><img src="http://placehold.it/350x150&text=FooBar8"></div> <div class="slide"><img src="http://placehold.it/350x150&text=FooBar9"></div> </div> <!--纵向旋转木马轮播--> <div class="slider8"> <div class="slide"><img src="http://placehold.it/300x100&text=FooBar1"></div> <div class="slide"><img src="http://placehold.it/300x100&text=FooBar2"></div> <div class="slide"><img src="http://placehold.it/300x100&text=FooBar3"></div> <div class="slide"><img src="http://placehold.it/300x100&text=FooBar4"></div> <div class="slide"><img src="http://placehold.it/300x100&text=FooBar5"></div> <div class="slide"><img src="http://placehold.it/300x100&text=FooBar6"></div> <div class="slide"><img src="http://placehold.it/300x100&text=FooBar7"></div> <div class="slide"><img src="http://placehold.it/300x100&text=FooBar8"></div> <div class="slide"><img src="http://placehold.it/300x100&text=FooBar9"></div> <div class="slide"><img src="http://placehold.it/300x100&text=FooBar10"></div> </div> <!--引入jquery文件--> <script src="jquery/jquery.min.js"></script> <!--引入bxslider里的js--> <script src="bxslider/jquery.bxslider.min.js"></script> <script src="ceshi.js"></script> </body> </html>
js
/** * Created by admin on 2017/5/2. */ $(function () { //<!--普通轮播图--> $(‘.bxslider‘).bxSlider({auto: true, autoControls: true}); //<!--横向旋转木马轮播--> $(‘.slider1‘).bxSlider({auto: true, slideWidth: 200, minSlides: 2, maxSlides: 3, slideMargin: 10}); //<!--纵向旋转木马轮播--> $(‘.slider8‘).bxSlider({ mode: ‘vertical‘, slideWidth: 300, minSlides: 2, slideMargin: 10 }); });
官方网站:http://bxslider.com/
jQuery补充,基于jQuery的bxslider轮播器插件
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。