2016-02-24 163 views
0

我想添加一個畫布菜單到我的網站,但我是一個基礎初學者,我不知道如何使用它。我已閱讀基金會網站的文檔和我一直在尋求構建塊,但我不能添加過canvas.This是我的HTML:基礎6關閉畫布菜單

<div class="off-canvas-wrapper"> 
<div class="off-canvas-wrapper-inner" data-off-canvas-wrapper> 
    <div class="off-canvas position-left" id="offCanvas" data-off-canvas> </div> 
    <div class="title-bar"> 
     <div class="title-bar-left"> 
      <button class="menu-icon" type="button" data-open="offCanvas"></button> 
      <span class="title-bar-title">Title</span> 
     </div> 
    </div> 
    <div class="off-canvas-content" data-off-canvas-content></div> 
</div> 

我按開放關閉帆布按鈕,但我的菜單不appear.I都用這個文庫

<link rel="stylesheet" href="style/foundation.css"/> 
<script src="style/foundation.js"></script> 
<script src="style/js/app.js"></script> 
<script src="style/css/app.css"></script> 
<script src="style/bower_components/foundation-sites/js/foundation.core.js"></script> 
<script src="style/bower_components/foundation-sites/js/foundation.dropdownMenu.js"></script> 
<script src="style/bower_components/jquery/dist/jquery.js"></script> 
<script src="style/bower_components/foundation-sites/js/foundation.util.keyboard.js"></script> 
<script src="style/bower_components/foundation-sites/js/foundation.util.box.js"></script> 
<script src="style/bower_components/foundation-sites/js/foundation.util.nest.js"></script> 
<script src="style/bower_components/what-input/what-input.js"></script> 
<script src="style/bower_components/foundation-sites/js/foundation.offcanvas.js"></script> 

感謝

+0

您可以創建一個小提琴嗎? –

回答

1

拷貝:

<div class="off-canvas-wrapper"> 
    <div class="off-canvas-wrapper-inner" data-off-canvas-wrapper> 
    <div class="off-canvas position-left" id="offCanvas" data-off-canvas>MY OFF CANVAS</div> 
    <div class="off-canvas-content" data-off-canvas-content> <button type="button" class="button" data-toggle="offCanvas">Open Menu</button></div> 
    </div> 
    </div> 

我希望它能幫助!在與「打開菜單」 - 鍵你把孔頁......股利

0

一些步驟,以幫助您:

  1. 好像你已經包括了所有的元素自己。這是一個不好的做法,我建議你最好包括在一個文件中的所有基金會的JS的(就像他們交給你,當你下載 here

  2. 基礎的新的安裝,請確保您基金會的結構後去。從文檔,對於脫離Canvas元素的結構是:

完整鏈接的文檔是here

<body> 
    <div class="off-canvas-wrapper"> 
    <div class="off-canvas-wrapper-inner" data-off-canvas-wrapper> 
     <div class="off-canvas position-left" id="offCanvas" data-off-canvas> 

    <!-- Close button --> 
    <button class="close-button" aria-label="Close menu" type="button" data-close> 
     <span aria-hidden="true">&times;</span> 
    </button> 

    <!-- Menu --> 
    <ul class="vertical menu"> 
     <li><a href="#">Foundation</a></li> 
     <li><a href="#">Dot</a></li> 
     <li><a href="#">ZURB</a></li> 
     <li><a href="#">Com</a></li> 
     <li><a href="#">Slash</a></li> 
     <li><a href="#">Sites</a></li> 
    </ul> 

    </div> 

     <div class="off-canvas-content" data-off-canvas-content> 
     <!-- Page content --> 
     </div> 
    </div> 
    </div> 
</body>