Foundation is used to develop responsive HTML, CSS and JavaScript frameworks.

Foundation is an easy-to-use, powerful and flexible framework for building web applications on any device.

Foundation is a popular mobile-first framework.

Foundation top navigation bar syntax

Instructions: The top navigation bar is placed at the head of the page

Foundation top navigation bar example

<!DOCTYPE html>
<html>
<head>
  <title>Foundation 实例</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://cdn.bootcss.com/foundation/5.5.3/css/foundation.min.css">
  <script src="https://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>
  <script src="https://cdn.bootcss.com/foundation/5.5.3/js/foundation.min.js"></script>
  <script src="https://cdn.bootcss.com/foundation/5.5.3/js/vendor/modernizr.js"></script>
</head>
<body>

<nav class="top-bar" data-topbar>
  <ul class="title-area">
    <li class="name">
      <h1><a href="#">WebSiteName</a></h1>
    </li>
   <!-- 小屏幕上折叠按钮: 去掉 .menu-icon 类,可以去除图标。 
      如果需要只显示图片,可以删除 "Menu" 文本 -->
    <li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
  </ul>

  <section class="top-bar-section">
    <ul class="left">
      <li class="has-dropdown">
        <a href="#">Dropdown</a>
        <ul class="dropdown">
          <li><label>Level 1</label></li>
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
          <li class="has-dropdown">
            <a href="#">New dropdown</a>
            <ul class="dropdown">
              <li><label>Level 2</label></li>
              <li><a href="#">2nd level dropdown</a></li>
              <li><a href="#">2nd level dropdown</a></li>
              <li class="has-dropdown">
                <a href="#">New dropdown</a>
                <ul class="dropdown">
                  <li><label>Level 3</label></li>
                  <li><a href="#">3rd level dropdown</a></li>
                  <li><a href="#">3rd level dropdown</a></li>
                </ul>
              </li>
            </ul>
          </li>
        </ul>
      </li>
    </ul>
  </section>
</nav>

<div style="padding:20px;">
  <h3>导航栏内嵌下拉菜单</h3>
  <p>该实例演示了下拉菜单中再嵌入下拉菜单。</p>
</div>

<!-- 初始化 Foundation JS -->
<script>
$(document).ready(function() {
    $(document).foundation();
})
</script>

</body>
</html>

Run instance »

Click the "Run instance" button to view the online instance