平滑的滚动基础5不起作用

时间:2014-06-03 12:05:34

标签: html css zurb-foundation

我正在使用Foundation 5 magellan导航,但平滑滚动不起作用。例如,一切都很好:http://foundation.zurb.com/docs/components/magellan.html

我的代码:http://jsfiddle.net/5LKzf/

<head>
    <link rel="stylesheet" href="css/foundation-5.2.2/css/foundation.css" />
    <link rel="stylesheet" href="css/foundation-5.2.2/css/normalize.css" />
    <script src="css/foundation-5.2.2/js/vendor/modernizr.js"></script>
</head>

<body>

//my link
    <li class="item-109 menu-el active"><dd data-magellan-arrival="/"><a href="#/" >Main Page</a></dd></li>


//my anhor
   <a class="link-pos" data-magellan-destination="/" name="/">&nbsp;</a>

  <script src="css/foundation-5.2.2/js/vendor/jquery.js"></script>
        <script src="css/foundation-5.2.2/js/vendor/fastclick.js"></script>
        <script src="css/foundation-5.2.2/js/foundation.min.js"></script>    

        <script>
            $( document ).foundation();
        </script>

        <script src="js/jquery-1.11.1.min.js"></script>
        <script src="js/main.js"></script>
</body>

我忘了包含任何文件吗?

1 个答案:

答案 0 :(得分:0)

根据文档

&#34; 确保在继续之前,jquery.js,foundation.js和foundation.magellan.js已包含在您的网页上。例如,在结束标记之前添加以下内容:&#34;

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

根据您发布的代码,您错过了magellan js,这可以解释为什么它不起作用!

我使用过Foundation 5,并且您需要确保包含相关的javascript。

我希望这有帮助!