基于jQuery实现键盘控制图像滑块切换



28 109 37



特效描述:基于jQuery实现 键盘控制 图像滑块切换,基于jQuery实现键盘控制图像滑块切换

代码结构

1. 引入CSS

<link href="demo/assets/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="demo/assets/css/style.css" />
<link rel="stylesheet" href="css/lush.animations.css" />
<link rel="stylesheet" href="css/lush.min.css" />
<link href="demo/assets/css/bootstrap-responsive.css" rel="stylesheet">

2. 引入JS

<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<script src="ga.js"></script>
<script src="demo/assets/js/jquery.js"></script>
<script src="demo/assets/js/bootstrap.min.js"></script>
<script src="js/jquery.easing.1.3.min.js"></script>
<script src="js/jquery.lush.js"></script>

3. HTML代码

    <div class="container">
      <br>
      <div class="row">
        <div class="span12">
          <!-- Lush Slider -->
          <ul class="lush-slider shadow-a">
            <li class="lush">
                <img src="demo/slider/sky.png"
                      data-slide-in="at 100 from back use easeInCirc during 600" 
                      data-slide-out="at 15500 to back-left use swing during 600" 
                      style="top: 0; left: 0; " />   
                <img src="demo/slider/clouds.png"
                      data-slide-in="at 3400 from r use easeOutCirc during 3000" 
                      data-slide-out="at 9500 to l use easeInCirc during 600" 
                      style="top: 0; left: 0; " />   
                <img src="demo/slider/clouds.png"
                      data-slide-in="at 5000 from r use easeOutQuart during 3000" 
                      data-slide-out="at 8000 to left use easeInCirc during 600" 
                      style="top: 10%; left:15%; " />   
                <img src="demo/slider/tree-1.png" id="arbol"
                      data-slide-in="at 2500 from bottom use easeOutQuart during 600" 
                      data-slide-out="at 12000 to back use easeInBack during 600" 
                      style="top: 20%; left: 2%; " />   
                <img src="demo/slider/tree-2.png"
                      data-slide-in="at 2600 from bottom use easeOutQuart during 600" 
                      data-slide-out="at 12100 to back use easeInBack during 600" 
                      style="top: 20%; left: 22%; " />   
                <img src="demo/slider/tree-3.png"
                      data-slide-in="at 2700 from bottom use easeOutQuart during 600" 
                      data-slide-out="at 12200 to back use easeInBack during 600" 
                      style="top: 20%; left: 55%; " />   
                <img src="demo/slider/tree-4.png"
                      data-slide-in="at 2800 from bottom use easeOutQuart during 600" 
                      data-slide-out="at 12300 to back use easeInBack during 600" 
                      style="top: 20%; left: 75%; " />   
                <img src="demo/slider/pasto.png"
                      data-slide-in="at 2000 from right use easeOutCirc during 400" 
                      data-slide-out="at 13600 to left use easeInBack during 600" 
                      style="bottom: 0; left: 0; " />   
                <h1 class="t-white"
                    data-slide-in="at 5000 from front use easeOutBack  during 500"  
                    data-slide-out="at 10500 to front use easeInBack during 600"
                    style="top: 30%; left: 30%;">Lush Slider</h1>
                <h2 id="a1" class="t-yellow rounded"
                    data-slide-in="at 6000 from l use easeOutCirc during 2500"  
                    data-slide-out="at 1500 to r use easeInCirc during 600 force"
                    style="top: 55%; left: 40%;">A powerful component slider</h2>
                <h2 class="t-yellow rounded"
                    data-slide-in="at 6000 from r use easeOutCirc during 2500"  
                    data-slide-out="at 1500 to l use easeInCirc  during 600 force"
                    style="top: 70%; left: 30%;">powered by CSS3 and jQuery</h2>
                <h2 class="t-yellow rounded"
                    data-slide-in="at 10000 from l use easeOutCirc during 2500"  
                    data-slide-out="at 1500 to r use easeInCirc during 600"
                    style="top: 55%; left: 40%;">A flexible slider </h2>
                <h2 class="t-yellow rounded"
                    data-slide-in="at 10000 from r use easeOutCirc during 2500"  
                    data-slide-out="at 1500 to l use easeInCirc  during 600"
                    style="top: 70%; left: 30%;">with better performance in animations </h2>
            </li> 
            <li class="lush" id="l3">
              <img src="demo/slider/soundbg.png"
                   data-slide-in="at 100 from back-right use easeInQuad during 600" 
                   data-slide-out="at 10900 to back-bottom use easeInQuad during 400"
                   style="top: 0; left: 0;" />   
              <img src="demo/slider/soundline.png"
                   data-slide-in="plus 700 from flip-h use easeInQuad during 600"
                   data-slide-out="at 9800 to flip-h use easeInQuad during 400" 
                   style="top: 40%; left: 0;" />   
              <img src="demo/slider/woofer1.png"
                   data-slide-in="plus 500 from back use easeOutBack during 600"
                   data-slide-out="at 8000 to back-bottom use easeInQuad during 400" 
                   style="top: 10%; left: 40%;" />   
              <img src="demo/slider/woofer2.png"
                   data-slide-in="plus 200 from back use easeOutBack during 600"
                   data-slide-out="plus 100 to back-bottom use easeInQuad during 400" 
                   style="top: 30%; left: 58%;" />   
              <img src="demo/slider/woofer3.png"
                   data-slide-in="plus 200 from back use easeOutBack during 600"
                   data-slide-out="plus 100 to back-bottom use easeInQuad during 400" 
                   style="top: 40%; left: 30%;" />   
              <img src="demo/slider/woofer4.png"
                   data-slide-in="plus 200 from back use easeOutBack during 600" 
                   data-slide-out="plus 100 to back-bottom use easeInQuad during 400"
                   style="top: 58%; left: 39%;" />   
              <h1 class="t-red rounded"
                  data-slide-in="plus 200 from front use easeOutBack during 600"
                  data-slide-out="at 4000 to front use easeInBack during 600"
                  style="top: 10%; left: 5%;">Let's get <br /><b>LOUDER</b></h1>
              <h2 class="t-red rounded"
                  data-slide-in="plus 700 from flip-h use easeOutBack during 600"
                  data-slide-out="plus 100 to left use easeInBack during 600"
                  style="top: 60%; left: 5%;">Latest <i>advanced</i> animations</h2>
              <h2 class="t-red rounded"
                  data-slide-in="plus 200 from flip use easeOutBack during 600"
                  data-slide-out="plus 100 to left use easeInBack during 600"
                  style="top: 75%; left: 5%;">to make your own <i>Lush</i> presentation</h2>
              <h3 class="t-orange rounded"
                  data-slide-in="plus 1200 from rtr use easeOutCirc during 600"
                  data-slide-out="at 3900 to front-left use easeOutBack during 600"
                  style="top: 10%; left: 70%;">Easy Markup</h3>
              <h3 class="t-orange rounded"
                  data-slide-in="plus 100 from ltr use easeOutCirc during 600"
                  data-slide-out="plus 100 to front-right use easeOutBack during 600"
                  style="top: 20%; left: 70%;">Semantic sintax</h3>
              <h3 class="t-orange rounded"
                  data-slide-in="plus 100 from ltr use easeOutCirc during 600"
                  data-slide-out="plus 100 to front-left use easeOutBack during 600"
                  style="top: 30%; left: 70%;">Extensible animations</h3>
              <h3 class="t-orange rounded"
                  data-slide-in="plus 100 from ltr use easeOutCirc during 600"
                  data-slide-out="plus 100 to front-right use easeOutBack during 600"
                  style="top: 40%; left: 70%;">Native transitions</h3>
              <h3 class="t-orange rounded"
                  data-slide-in="plus 100 from rtr use easeOutCirc during 600"
                  data-slide-out="plus 100 to front-left use easeOutBack during 600"
                  style="top: 50%; left: 70%;">Best performance</h3>
              <h3 class="t-orange rounded"
                  data-slide-in="plus 100 from rtr use easeOutCirc during 600"
                  data-slide-out="plus 100 to front-right use easeOutBack during 600"
                  style="top: 60%; left: 70%;">Fully Responsive</h3>
              <h3 class="t-orange rounded"
                  data-slide-in="plus 100 from ltr use easeOutCirc during 600"
                  data-slide-out="plus 100 to front-left use easeOutBack during 600"
                  style="top: 70%; left: 70%;">Crossbrowser support</h3>
            </li>
            <li class="lush" id="l1">
                <img src="demo/slider/darkbg.png"  
                     data-slide-in="at 0 from back-top use easeOutExpo  during 800"  
                     data-slide-out="at 7000 to back use easeInBack during 600"/>
                <h2 class="t-white"
                    data-slide-in="at 500 from back use easeOutBack  during 500"  
                    data-slide-out="at 3500 to lbr use easeInBack during 600"
                    style="top: 10%; left: 10%;">ENHANCED YOUR SLIDER</h2>
                <h3 class="t-yellow-b"
                    data-slide-in="at 1500 from back-rotate2 use easeOutQuart during 500"  
                    data-slide-out="at 3500 to rbr use easeInBack during 600"
                    style="top: 30%; left: 10%;">POWERED BY</h3>
                <h2 class="t-white-b"
                    data-slide-in="at 1700 from front-rotate use easeOutQuart during 800" 
                    data-slide-out="at 3500 to right use easeInBack during 600" 
                    style="top: 40%; left: 10%; ">FLEXSLIDER</h2>
                <h1 class="t-yellow-b"
                    data-slide-in="at 2300 from back use easeOutBack  during 600"  
                    data-slide-out="at 3000 to front-rotate use easeInBack during 600"
                    style="top: 50%; left: 20%;">+</h1>
                <h2 class="t-white-b"
                    data-slide-in="at 1800 from front-rotate use easeOutQuart during 800" 
                    data-slide-out="at 3000 to left use easeInBack during 600" 
                    style="top: 70%; left: 10%; ">LUSH CONTENT SLIDER</h2>   
                <img src="demo/slider/lamp.png"
                      data-slide-in="at 3200 from front use easeOutQuart during 500" 
                      data-slide-out="at 3000 to back use easeInBack during 600" 
                      style="top: 10%; left: 65%; " />   
                <a href="#"
                    data-slide-in="at 3500 from top use easeOutCirc during 600" 
                    data-slide-out="at 2600 to front-rotate use easeInBack during 600" 
                    style="top: 5%; left: 80%; "> 
                      <img src="demo/slider/bubble.png"/>
                </a>   
            </li>          
          </ul>
          <!-- /Lush Slider -->
        </div>
      </div>
      <div id="feat"></div>
    </div> <!-- /container -->
        <script>
            $(function() {
                $('#feat').load('features.html')
                $('.lush-slider').lush({
                  slider: {pauseOnHover: true}
                });
            })
        </script>
<div style="text-align:center;clear:both">
</div>



用户评论
大牛,别默默的看了,快登录帮我点评一下吧!:)      登录 | 注册


热门标签: 图片叠加 图片层叠 图片翻转 图片旋转 图片拖动 图片拖拽 图片延迟加载 图片延迟 图片加载 图片淡出淡进 图片淡出 图片淡进 图片全屏 头像上传 图片上传 二维码 图片放大镜 h5图片动画 h5图标动画 html5图片动画 html5图标动画 带缩略图的幻灯片 地图 中国地图 世界地图 flash焦点图 flash幻灯片 flashbanner flash图片轮播 图片放大缩小 图片缩放 图片大小 图片放大 图片缩小 图片变大 图片变小 滚动切换 滚动条切换 图片广告 滑动选项卡 滑动切换 纯图片轮播 图片轮播 图片收缩展开 图片收缩 图片展开 图片滚动 图片滚动条 图片滑动 图片滑块 旋转木马 图片旋转木马 文字旋转木马 旋转木马插件 图片切换 图片选项卡 图标选项卡 图标导航 图标菜单 自动滚动图片轮播 滑动手风琴 背景切换 大图切换 选项卡切换 选项卡 切换 tab切换 页面切换 选项卡插件 切换插件 手风琴 水平手风琴 垂直手风琴 图片手风琴 文字手风琴 手风琴插件 切换按钮 表单 表单美化 表单插件 表单美化插件 图表 焦点图 幻灯片 轮播图 bar焦点图 图片 图片插件 头像截图 图片切换 图片选项卡 图标选项卡 纯图片轮播 图片轮播 选项卡自动切换 响应式图片 按钮控制

×
×

注册

官方QQ群

扫描上面二维码加微信群

官方QQ群

jQuery/js讨论群
群号:642649996
Css3+Html5讨论群
群号:322131262

加群请备注:从官网了解到