3
我剛剛下載了Foundation 5 CSS框架並複製了本教程的代碼,但下拉菜單似乎不起作用,以及「移動」視圖中的菜單。基金會Zurb下拉不起作用
我的代碼:
<html>
<head>
<link rel="stylesheet" href="css/foundation.css" />
<script src="js/vendor/modernizr.js"></script>
<script src="js/vendor/jquery.js"></script>
<script src="js/foundation/foundation.js"></script>
<script src="js/foundation/foundation.dropdown.js"></script>
<script src="js/foundation/foundation.topbar.js"></script>
<script> $(document).foundation(); </script>
</head>
<body>
<!-- header -->
<nav class="top-bar" data-topbar>
<ul class="title-area">
<li class="name">
<h1><a href="#">My Site</a></h1>
</li>
<li class="toggle-topbar menu-icon"><a href="#">Menu</a></li>
</ul>
<section class="top-bar-section">
<!-- Right Nav Section -->
<ul class="right">
<li class="active"><a href="#">Right Button Active</a></li>
<li class="has-dropdown">
<a href="#">Right Button Dropdown</a>
<ul class="dropdown">
<li><a href="#">First link in dropdown</a></li>
</ul>
</li>
</ul>
<!-- Left Nav Section -->
<ul class="left">
<li><a href="#">Left Nav Button</a></li>
</ul>
</section>
</nav>
</body>
</html>
任何人有,爲什麼它不工作的任何想法?
指定<!DOCTYPE HTML!>而不是標籤 – chinmayahd
還是一樣.. – user20
是否有您的瀏覽器代碼顯示的錯誤檢查? – Yako