2015-05-07 39 views
-1

我想知道如何找到類似於Flickr's homepage的東西?我在談論靜態背景下的透明幻燈片。到目前爲止,我知道如何使用靜態背景並瀏覽透明DIV,但我不知道幻燈片「系統」是如何工作的。我如何獲得類似於Flickr網站的內容?

謝謝。

+0

你應該看看Parralax滾動,也scrollTo那裏有好的圖書館。 – craigie2204

+0

爲什麼some1會降低這一點? @ craigie2204謝謝!我一定會給他們一個嘗試。, – Raulnd

+1

[fullPage.js](http://alvarotrigo.com/fullPage/)是你的答案。只需使用插件選項'scrollBar:true'即可。 – Alvaro

回答

1

只需製作一個普通網站,但在頁面中添加一個auto scroller腳本即可完成此操作。

按鈕上下往上只是一些<a href="#id"></a>標籤,其ID爲鏈接。通常情況下,你會立即在該ID,但與你的auto scroller你會順利。

這裏是一個auto scroller,我總是用我的網站(an example by pressing in the menu):

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> 
    <script> 
    $(function() { 
     $('a[href*=#]:not([href=#])').click(function() { 
     if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { 
      var target = $(this.hash); 
      target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); 
      if (target.length) { 
      $('html,body').animate({ 
       scrollTop: target.offset().top 
      }, 2000 /*<-- This is your time for every scroll in miliseconds*/); 
      return false; 
      } 
     } 
     }); 
    }); 
    </script> 

我希望這有助於你。

+0

這是不一樣的。用鼠標滾動時不會自動滾動。 – Alvaro

+0

您可以創建一個腳本來調用您的滾動條..非常容易,我認爲 –

+0

當您開始考慮動態滾動(蘋果筆記本電腦),觸摸設備,性能(jQuery的速度很慢),響應式設計等時,這並不容易。 – Alvaro

0

我會說:使用fullpage.js庫。

它將使你的生活簡單而美麗:)

只要記住使用scrollBar:true如果你想顯示滾動中的Flickr網站。

相關問題