2013-11-27 84 views
0

如果複製並粘貼Zurb的Foundation的Offcanvas佈局的「基本」代碼實現,則段落內容不會滾動。這不會破壞這個功能的實用性嗎?我在這裏錯過了什麼?Zurb Foundation 5在Offcanvas中隱藏內容

http://foundation.zurb.com/docs/components/offcanvas.html

這是代碼,我從該頁面的複製粘貼:

<div class="off-canvas-wrap"> 
    <div class="inner-wrap"> 

    <a class="left-off-canvas-toggle" >Menu</a> 

    <!-- Off Canvas Menu --> 
    <aside class="left-off-canvas-menu"> 
     <!-- whatever you want goes here --> 
     <ul> 
      <li><a href="#">Item 1</a></li> 
     ... 
     </ul> 
    </aside> 

    <!-- main content goes here --> 
    <p>THESE PARAGRAPHS WILL NOT SCROLL Set in the year 0 F.E. ("Foundation Era"), The Psychohistorians opens on Trantor, the capital of the 12,000-year-old Galactic Empire. Though the empire appears stable and powerful, it is slowly decaying in ways that parallel the decline of the Western Roman Empire. Hari Seldon, a mathematician and psychologist, has developed psychohistory, a new field of science and psychology that equates all possibilities in large societies to mathematics, allowing for the prediction of future events.</p> 
    <p>THESE PARAGRAPHS WILL NOT SCROLL Set in the year 0 F.E. ("Foundation Era"), The Psychohistorians opens on Trantor, the capital of the 12,000-year-old Galactic Empire. Though the empire appears stable and powerful, it is slowly decaying in ways that parallel the decline of the Western Roman Empire. Hari Seldon, a mathematician and psychologist, has developed psychohistory, a new field of science and psychology that equates all possibilities in large societies to mathematics, allowing for the prediction of future events.</p> 
    <p>THESE PARAGRAPHS WILL NOT SCROLL Set in the year 0 F.E. ("Foundation Era"), The Psychohistorians opens on Trantor, the capital of the 12,000-year-old Galactic Empire. Though the empire appears stable and powerful, it is slowly decaying in ways that parallel the decline of the Western Roman Empire. Hari Seldon, a mathematician and psychologist, has developed psychohistory, a new field of science and psychology that equates all possibilities in large societies to mathematics, allowing for the prediction of future events.</p> 

    <!-- close the off-canvas menu --> 
    <a class="exit-off-canvas"></a> 

    </div> 
</div> 

回答

0

確保包括JavaScript文件:

在頭部分

 <script src="/js/vendor/custom.modernizr.js"></script> 

就在結束標籤之前

<script src="/js/vendor/jquery.js"></script> 

    <script src="/js/vendor/fastclick.js"></script> 

    <script src="/js/foundation.js"></script> 

和正確的依賴,在你的情況補充一點:

<script src="/js/foundation.offcanvas.js"></script> 

瞭解更多詳情,請訪問:http://foundation.zurb.com/docs/javascript.html

問候