jQuery轮播插件slider

所属分类:媒体-幻灯片和轮播图

 614983  1202  查看评论 (353)
分享到微信朋友圈
X
jQuery轮播插件slider ie兼容8

jQuery: 部分

$(function(){
  $('#marquee').bxSlider({
        mode:'vertical', //默认的是水平
        displaySlideQty:1,//显示li的个数
        moveSlideQty: 1,//移动li的个数  
        captions: true,//自动控制
        auto: true,
        controls: false//隐藏左右按钮
  });
}); 

HTML: 结构

<div style="width:450px; height:296px; float:left; overflow:hidden; margin-left:200px;">
  <ul id="marquee">
            <li><img src="img/1.jpg" alt="banner_1" style="width:450px; height:296px;"></li>
            <li><img src="img/2.jpg" alt="banner_1" style="width:450px; height:296px;"></li>
     </ul>
</div>

CSS 样式定义左右按钮

.bx-prev{ width:12px; height:26px; background:#f00;text-indent: -999999px;z-index: 999;  position: absolute; float:left; left:455px; top:110px;}
.bx-next{ width:12px; height:26px;  background:#f00; text-indent: -999999px;z-index: 999;  position: absolute; top:110px;left:-15px;}

============= 以下内容由 旅图灬 提供============

参数说明:

bxSlider 详细配置参数:
bxSlider有很多配置参数,使你能够用参数制作出各种各样的slider效果:

mode: 'horizontal',                 // 'horizontal', 'vertical', 'fade' 定义slider滚动的方向,有三个值可供选择 
infiniteLoop: true,                 // true, false - display first slide after last 无限循环 
hideControlOnEnd: false,            // true, false - if true, will hide 'next' control on last slide and 'prev' control on first 如果设置true,将会在最后一个幻灯片隐藏“next”,在最前面的幻灯片因此“prev” 
controls: true,                     // true, false - previous and next controls 是否显示“previous”和“next”按钮 
speed: 500,                         // integer - in ms, duration of time slide transitions will occupy   速度,单位为毫秒 
easing: 'swing',                    // used with jquery.easing.1.3.js - see http://gsgd.co.uk/sandbox/jquery/easing/ for available options 
pager: true,                        // true / false - display a pager 
pagerSelector: null,                // jQuery selector - element to contain the pager. ex: '#pager' 
pagerType: 'full',                  // 'full', 'short' - if 'full' pager displays 1,2,3... if 'short' pager displays 1 / 4   如果设置full,将显示1,2,3……,如果设置short,将显示1/4 . 
pagerLocation: 'bottom',            // 'bottom', 'top' - location of pager 页码的位置 
pagerShortSeparator: '/',           // string - ex: 'of' pager would display 1 of 4 页面分隔符 
pagerActiveClass: 'pager-active',   // string - classname attached to the active pager link 当前页码的className 
nextText: 'next',                   // string - text displayed for 'next' control 下一页的文字 
nextImage: '',                      // string - filepath of image used for 'next' control. ex: 'images/next.jpg' 可以设置下一页为图片 
nextSelector: null,                 // jQuery selector - element to contain the next control. ex: '#next' 
prevText: 'prev',                   // string - text displayed for 'previous' control 上一页的文字 
prevImage: '',                      // string - filepath of image used for 'previous' control. ex: 'images/prev.jpg' 上一页的图片 
prevSelector: null,                 // jQuery selector - element to contain the previous control. ex: '#next' 
captions: false,                    // true, false - display image captions (reads the image 'title' tag) 是否显示图片的标题,读取图片的title属性的内容。 
 
captionsSelector: null,             // jQuery selector - element to contain the captions. ex: '#captions' 
auto: false,                        // true, false - make slideshow change automatically 幻灯片自动滚动 
autoDirection: 'next',              // 'next', 'prev' - direction in which auto show will traverse 自动滚动的顺序 
autoControls: false,                // true, false - show 'start' and 'stop' controls for auto show 自动滚动的控制键 
autoControlsSelector: null,         // jQuery selector - element to contain the auto controls. ex: '#auto-controls' 
autoStart: true,                    // true, false - if false show will wait for 'start' control to activate  
autoHover: false,                   // true, false - if true show will pause on mouseover 设置鼠标mouseover将会使自动滚动暂停 
autoDelay: 0,                       // integer - in ms, the amount of time before starting the auto show 
pause: 3000,                        // integer - in ms, the duration between each slide transition  过渡时间 
startText: 'start',                 // string - text displayed for 'start' control 开始按钮的文字 
startImage: '',                     // string - filepath of image used for 'start' control. ex: 'images/start.jpg' 开始按钮的图片 
stopText: 'stop',                   // string - text displayed for 'stop' control 停止按钮的文本 
stopImage: '',                      // string - filepath of image used for 'stop' control. ex: 'images/stop.jpg'   停止按钮的图片 
ticker: false,                      // true, false - continuous motion ticker mode (think news ticker) 
                                    // note: autoControls and autoControlsSelector apply to ticker! 
tickerSpeed: 5000,                  // integer - has an inverse effect on speed. therefore, a value of 10000 will  
                                    // scroll very slowly while a value of 50 will scroll very quickly. 
tickerDirection: 'next',            // 'next', 'prev' - direction in which ticker show will traverse 
tickerHover: false,                 // true, false - if true ticker will pause on mouseover 
wrapperClass: 'bx-wrapper',         // string - classname attached to the slider wraper 
startingSlide: 0,                   // integer - show will start on specified slide. note: slides are zero based! 
displaySlideQty: 1,                 // integer - number of slides to display at once 
moveSlideQty: 1,                    // integer - number of slides to move at once 
randomStart: false,                 // true, false - if true show will start on a random slide
相关插件-幻灯片和轮播图

jQuery 3D旋转轮播jquery.roundabout.js

3D轮播图,每张图都有标题,并且可以附加链接,点击最上层的图片可跳转对应的链接
  幻灯片和轮播图
 59228  469

js垂直轮播广告幻灯片

js垂直轮播广告幻灯片
  幻灯片和轮播图
 38045  391

带缩略图的图片点击切换

jCarousel带缩略图的图片点击切换插件
  幻灯片和轮播图
 33563  370

html5全屏幻灯片切换

html5全屏阶梯式图片幻灯片切换
  幻灯片和轮播图
 33179  403

讨论这个项目(353)回答他人问题或分享插件使用方法奖励jQ币 评论用户自律公约

    无意 0
    2022/3/19 11:16:13
    怎么使用插件? 回复
    故旅 0
    2020/8/10 17:38:37
    大佬,这个设置了autoHover: false自动暂停, 鼠标移入没有效果呢 autoHover:true也是一样 回复
    故旅 0
    2020/8/10 17:38:14
    大佬,这个设置了autoHover: false自动暂停, 鼠标移入没有效果呢 autoHover:true也是一样 回复
    黑道狂徒 0
    2020/8/7 17:26:15
    最高只能兼容jq-1.9.1?高一点的没办法了?
    回复
    福福 0
    2020/1/3 1:03:16
    他和bootstrap有小冲突,这两个一起用的话, minSlides: , maxSlides: ,这两必须一样,否则就会自动隐藏一部分图片,而且不能自适应屏幕了有人有好办法吗??
    回复
    继续向前! 0
    2019/12/20 17:52:40
    轮播时间是哪一个呢
        zhangxubin0
        2020/4/10 0:23:10
        我也想知道!
        aaro20191
        2020/7/8 14:06:16
        pause: 3000, //每隔3秒轮播一次
    回复
    庆余年? 0
    2019/9/29 19:40:43
    我刚开始把他隐藏,然后点击再出现,发现图片不显示了,而且也宽度也变小了,求解

    回复
    moondac 0
    2019/8/27 14:19:33
    演示的是相应式的,下载的不是 回复
    长的丑才能活得久*???* 0
    2019/7/24 19:16:03
    为什么点击底部按钮之后就不轮播了?
        西瓜0
        2019/7/24 22:17:57

        可以把jquery.bxslider.js行中包含el.stopAuto();都注释了,一共有6行中包含,就不会暂停了。

        长的丑才能活得久*???*0
        2019/7/25 9:24:45
        感谢兄台的回复,swiper太多坑了 填不满才用这个的
    回复
    ??倪 0
    2019/5/29 11:50:26
    你好,这个怎么默认从某一个显示到最左侧?
        夜阑零露0
        2019/6/17 12:04:43
        可以调整图片的位置啊
    回复
😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
取消回复