2016-05-31 79 views
1

現在我嘗試通過fullpage.js插件製作我的網站。奇怪的底部區域from fullpage.js

https://github.com/alvarotrigo/fullPage.js#callbacks

但是有具有比其截面高度含量不再是段中的怪異的底部區域。 (有scrollOverflow的部分)

像這樣。

enter image description here

這是我的代碼。

$(document).ready(function() { 
    $('#fullpage').fullpage({ 
     'navigation': true, 
     paddingTop: '0', 
     paddingBottom: '0', 
     scrollOverflow: true, 
     afterLoad: function(anchorLink, index){ 
      //using anchorLink 
      if(anchorLink == 'grey-fade-bg-slide'){ 
       //alert("eoaehou"); 
       $("body").css("background-image","url('img/team-bg.jpg')"); 
      } 

      if(anchorLink == 'banner-slide'){ 
       //$("#map").css("height","120px"); 
       if(window.location.href.indexOf("our-team-bg-slide") > -1 || window.location.href.indexOf("contact-us-bg-slide") > -1) { 
        //alert("ccccc"); 
        $("body").css("background-image","url('img/team-bg.jpg')"); 
       } 
      } 

      if(anchorLink == 'blue-bg-slide'){ 
       //alert("eoaehou"); 
       $("body").css("background-image","url('img/banner-bg-image.jpg')"); 
      } 
     }, 
     afterRender: function(){ 
      initMap(); 
      $(".our-team-bg-section h3").css("margin-top","120px"); 
      $(".contact-us-bg-section h3").css("margin-top","60px"); 
      $(".grey-fade-bg-section h3").css("margin-top","120px"); 
     } 

    }); 
}); 

我包括的所有js文件。

<script src="js/jquery-1.12.4.min.js" type="text/javascript"></script> 
<script src="js/bootstrap.min.js" type="text/javascript"></script> 
<script src="js/scrolloverflow.min.js" type="text/javascript"></script> 
<script src="js/jquery.fullPage.min.js" type="text/javascript"></script> 
<script src="js/jquery.easings.min.js" type="text/javascript"></script> 

因此,任何人都知道如何解決這個問題? 謝謝!

+0

在我看來,上面的地圖不適合在一個單一的屏幕上,因此它分裂到一個新的幻燈片。 –

+0

是的內容是一個單一的屏幕,所以我打開scrollOverflow他們可以滾動只有一個屏幕,但它仍然比它應該更長。 – user3403614

+0

您是否包含文檔中指出的外部scrolloverflow.js庫?你沒有與我們分享足夠的東西,所以我們這裏真的沒有辦法幫助,只是猜測。 –

回答

1

您應該使用類fp-auto-height作爲詳細in the fullpage.js docs

查看demo onlinein codepen

<div class="section">Whole viewport</div> 
<div class="section fp-auto-height">Auto height</div> 
+0

我試過了,但還是什麼都沒發生。 – user3403614

+1

然後你做錯了什麼:) – Alvaro

+0

我不知道爲什麼,但是當我停止使用他們的.css,然後使用他們的.scss,而不是每件事情都解決了。 – user3403614