SuperSlide2實現圖片滾動特效

來源:互聯網
上載者:User

這裡貼一下自己示範的代碼,期望對使用的朋友所有啟發,我這裡是結合了兩個例子實現的

.focus-item ul li.item{  text-align: center;}.scroll-area .prev,.scroll-area .next{  position: absolute;  bottom: 590px;  width: 29px;  height: 64px;  opacity: 0.6;  overflow: hidden;  display: none;  text-indent: -999px;  border: medium none;  background: url('/images/arrowLR.png') no-repeat scroll 0% 0% transparent;}.scroll-area .prev{  left: 0px;  background-position: -50px 0px;}.scroll-area .next{  right: 0px;}.scroll-area .bdOn .prev,.scroll-area .bdOn .next{  display: block;} .scroll-area .focus-hd{  /*width: 832px;*/  /*left: 60px;*/  /*position: absolute;*/  /*height: 100px;*/  /*overflow: hidden;*/  left: 63px;  position: absolute;} .focus-hd .sNext, .focus-hd .sPrev{  float: left;  display: block;  width: 14px;  height: 47px;  text-indent: -9999px;  background: url('/images/sprites1008.png') no-repeat scroll 0px -3046px transparent;}.focus-hd .sNext{  background-position: 0px -2698px;} .focus-hd .show_bottom_nav {  float: left;  margin: 0px 6px;  display: inline;  width: 832px;  overflow: hidden;}.focus-hd .show_bottom_nav ul li{  margin-left:15px;}

html示範代碼:

<div id="" class="scroll-area">  <div class="focus-item">    <ul>      <li data-bottom-thumb="/attachments/news_gallery/20140528162328_454.jpg" class="item" data-text-id="#thumbTxt1">        <img src="/attachments/news_gallery/20140528162328_454.jpg" alt="標題1" />      </li>      <li data-bottom-thumb="/attachments/news_gallery/20140528162328_733.jpg" class="item" data-text-id="#thumbTxt2">        <img src="/attachments/news_gallery/20140528162328_733.jpg" alt="標題2" />      </li>    </ul>    <a class="prev" href="javascript:void(0)"></a>    <a class="next" href="javascript:void(0)"></a>  </div>  <div class="focus-hd" style="">    <a class="sPrev prevStop" href="javascript:void(0)">←</a>    <div class="show_bottom_nav">      <ul>        <li data-bottom-thumb="/attachments/news_gallery/20140528162328_454.jpg" class="item" data-text-id="#thumbTxt1" style="float: left">          <img style="width: 150px;height: 100px" src="/attachments/news_gallery/20140528162328_454.jpg" alt="標題1" />        </li>        <li data-bottom-thumb="/attachments/news_gallery/20140528162328_733.jpg" class="item" data-text-id="#thumbTxt2" style="float: left">          <img style="width: 150px;height: 100px" src="/attachments/news_gallery/20140528162328_733.jpg" alt="標題2" />        </li>      </ul>    </div>    <a class="sNext" href="javascript:void(0)">→</a>  </div></div>

js指令碼代碼:

jQuery(".scroll-area").slide({titCell:'.focus-hd li',mainCell:'.focus-item ul',delayTime:0,trigger:0,autoPlay:true});jQuery(".scroll-area .focus-item").hover(function(){jQuery(this).addClass("bdOn")},function(){jQuery(this).removeClass('bdOn')});//小標籤的導航jQuery(".scroll-area .show_bottom_nav").slide({ mainCell:"ul",delayTime:100,vis:5,effect:"left",autoPage:true,prevCell:".sPrev",nextCell:".sNext" });

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.