基于jQuery實現鍵盤控制圖像滑塊切換



31 123 42



特效描述:基于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

加群請備注:從官網了解到

老夫子电子