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 Magellan Navigation syntax

Explanation: Magellan Navigation is a navigation index

Foundation Magellan Navigation example

<!DOCTYPE html>
<html>
<head>
  <title>Foundation 實(shí)例</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 style="height:1500px;padding:20px;">

<h2>Magellan</h2>
<h4 class="subheader">麥哲倫導(dǎo)航就是一個(gè)導(dǎo)航索引,位置是固定的,會(huì)根據(jù)用戶滾動(dòng)當(dāng)前展示的內(nèi)容自動(dòng)切換導(dǎo)航欄上的導(dǎo)航項(xiàng):</h4>
<hr>

<div data-magellan-expedition="fixed">
  <dl class="sub-nav">
    <dd data-magellan-arrival="page1"><a href="#page1">Page 1</a></dd>
    <dd data-magellan-arrival="page2"><a href="#page2">Page 2</a></dd>
  </dl>
</div>
<hr>

<div style="height:200px;background-color:#1abc9c;color:white;">
  <h3 data-magellan-destination="page1">頁(yè)面 1</h3>
  <a name="page1"></a>
  <p>滾動(dòng)屏幕,查看導(dǎo)航欄上的變化。</p>
</div>

<h3 data-magellan-destination="page2">頁(yè)面 2</h3>
<a name="page2"></a>
<p>滾動(dòng)屏幕,查看導(dǎo)航欄上的變化。并嘗試向上滾動(dòng)。</p>

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

</body>
</html>

Run instance ?

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