2015-10-15 42 views
0

我目前在單頁的網站使用引導和fullpagejs工作更高的高度:Fullpage.js:段具有比內容

我已經按照所需的HTML結構,但我的網站的每個部分都得到了巨大的高度。所以這些部分不適合他們的內容。

我注意到,如果我添加fp-auto-height類,一切都很好。內容適合各部分。但這不是正確的做法。

我不知道發生了什麼。

這裏是我的例子

<div id="fullpage"> 
    <!-- section 1 begin --> 
    <div data-anchor="p1-a" class="section"> 
     <div class="container-fluid"> 
      <div id="p1" class="row vertical-align"> 
       <div class="col-md-offset-5 col-md-6"> 
        <div class="row"> 
         <div class="col-xs-12"> 
         <h1 id="title-p1" class="reduce-space text-center">ANTHONY<span style="color: #E28509;">ROANI</span></h1> 
        </div> 
       </div> <!-- end row title intro --> 
       <div class="row"> 
        <div class="col-md-6"> 
         <p class="intro-text"> 
          ... 
         </p> 
        </div><!-- end left intro --> 
        <div class="col-md-6"> 
         <p class="intro-text"> 
          ... 
         </p> 
        </div> <!-- end right intro --> 
        <div class="container-fluid"> 
         <i class="intro-text"> ...</i> 
         <p class="intro-text">- Luc Fayard </p> 
        </div><!-- end citation intro --> 
       </div> <!-- end row content text intro --> 
      </div> <!-- end colonnes + offset page 1 --> 
     </div><!-- end bigrow page 1 --> 
    </div> 
</div> <!-- SECTION 1 END --> 

[... other sections] 
</div> <!-- end fullpage --> 

回答

1

第一部分請確保您不會忘記在你的文檔的最開頭添加強制性<!DOCTYPE html>聲明中this tutorial詳述。

例如:

<!DOCTYPE html> 
<html> 
    <head> 
    </head> 
    <body> 
     Demo 
    </body> 
</html> 

文檔類型是必要的,任何網站。

+0

感謝它解決了我的問題! :) – AnthonyR