JS滚动bxslider的使用

模板网 2014-10-24

1. 详细Demo:http://www.bxslider.com/examples

2、如何使用

在实际中如下引用:

<script type="text/javascript" src="js/jquery.js"></script>

<script type="text/javascript" src="js/jquery.bxslider.js"></script>

bxslider无缝滚动

<script type="text/javascript">

  $(function(){

    $('#marquee').bxSlider({

     mode:'vertical', //默认的是水平

     ticker: true,//自动滚动

     tickerSpeed:1000//tickerSpeed有逆影响速度。 因此,一个价值5000的滚动很慢,而价值50将滚动得很快。

    });

    }); 

</script>

bxslider滚动li

<script type=text/javascript>

$(function(){

  $('#marquee').bxSlider({

        mode:'vertical', //默认的是水平

        displaySlideQty:1,//显示li的个数

        moveSlideQty: 1,//移动li的个数  

        captions: true,//自动控制

        auto: true,

        controls: false//隐藏左右按钮

  });

}); 

</script>-->

3、关于bxSlideer的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_腋臭" style="width:450px; height:296px;"></li>

            <li><img src="img/2.jpg" alt="banner_腋臭" style="width:450px; height:296px;"></li>

     </ul>

</div>

4、关于bxSlideer的左右按钮的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;}

相关文章

  1. a标签点击过后出现虚线的解决方法

    问题:a标签点击过后出现虚线 解决方法:a{blr:expression(this.onFocus=this.blur());outline: none;}

  2. 仿站小工具 V6.0

    仿站小工具介绍: 仿站小工具是通过网址下载静态网页的工具。从输入的网址下载html代码,提取出JS、Css、Image、Picture、Flash等静态文件网址,再从下载完好的Css代码中提取出Image静态文件网址,通过网址下载静态文件,根据软件设置好的保存规则,自动修正

  3. 让position:fixed在IE6下可用!

    /*让position:fixed在IE6下可用!*/ .fixed-top/*头部固定*/{position:fixed;bottom:auto;top:0px;} .fixed-bottom/*底部固定*/{position:fixed;bottom:0px;top:auto;} .fixed-left/*左侧固定*/{position:fixed;right:auto;left:0px;} .fixed-right/*右侧固定

  4. 手机站布局中viewport的作用详解

    什么是Viewport?手机浏览器是把页面放在一个虚拟的窗口(viewport)中,通常这个虚拟的窗口(viewport)比屏幕宽,这样就不用把每个网页挤到很小的窗口中(这样会破坏没有针对手机浏览器优化的网页的布局),用户可以通过平移和缩放来看网页的不同部分。移动

  5. Zepto.js手机页面上替代jQuery的最佳Javascript库

    Zepto.js手机页面上替代jQuery的最佳Javascript库,Zepto是现代的浏览器最大程度上与jQuery兼容的API,简约的JavaScript库 ,如果你使用jQuery,你已经知道如何使用的Zepto。 虽然100%的jQuery覆盖率不是一个设计目标, 提供的API相匹配的jQuery的同行 。

随机推荐

  1. a标签点击过后出现虚线的解决方法

    问题:a标签点击过后出现虚线 解决方法:a{blr:expression(this.onFocus=this.blur());outline: none;}

  2. 仿站小工具 V6.0

    仿站小工具介绍: 仿站小工具是通过网址下载静态网页的工具。从输入的网址下载html代码,提取出JS、Css、Image、Picture、Flash等静态文件网址,再从下载完好的Css代码中提取出Image静态文件网址,通过网址下载静态文件,根据软件设置好的保存规则,自动修正

  3. 让position:fixed在IE6下可用!

    /*让position:fixed在IE6下可用!*/ .fixed-top/*头部固定*/{position:fixed;bottom:auto;top:0px;} .fixed-bottom/*底部固定*/{position:fixed;bottom:0px;top:auto;} .fixed-left/*左侧固定*/{position:fixed;right:auto;left:0px;} .fixed-right/*右侧固定

  4. 手机站布局中viewport的作用详解

    什么是Viewport?手机浏览器是把页面放在一个虚拟的窗口(viewport)中,通常这个虚拟的窗口(viewport)比屏幕宽,这样就不用把每个网页挤到很小的窗口中(这样会破坏没有针对手机浏览器优化的网页的布局),用户可以通过平移和缩放来看网页的不同部分。移动

  5. Zepto.js手机页面上替代jQuery的最佳Javascript库

    Zepto.js手机页面上替代jQuery的最佳Javascript库,Zepto是现代的浏览器最大程度上与jQuery兼容的API,简约的JavaScript库 ,如果你使用jQuery,你已经知道如何使用的Zepto。 虽然100%的jQuery覆盖率不是一个设计目标, 提供的API相匹配的jQuery的同行 。