【问题标题】:Zurb Foundation 5 hiding content in OffcanvasZurb Foundation 5 在 Offcanvas 中隐藏内容
【发布时间】:2013-11-27 15:13:53
【问题描述】:

如果您复制并粘贴 Zurb 的 Foundation 的 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>

【问题讨论】:

    标签: zurb-foundation


    【解决方案1】:

    确保包含 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

    问候

    【讨论】:

      猜你喜欢
      • 2014-01-14
      • 1970-01-01
      • 2016-11-18
      • 2014-03-04
      • 2014-04-14
      • 1970-01-01
      • 1970-01-01
      • 2017-02-24
      • 1970-01-01
      相关资源
      最近更新 更多