代码编辑器:
x
1
2
<meta charset="utf-8">
3
<meta name="viewport" content="width=device-width, initial-scale=1">
4
<link rel="stylesheet" href="https://cdn.bootcss.com/foundation/5.5.3/css/foundation.min.css">
5
<script src="https://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>
6
<script src="https://cdn.bootcss.com/foundation/5.5.3/js/foundation.min.js"></script>
7
<script src="https://cdn.bootcss.com/foundation/5.5.3/js/vendor/modernizr.js"></script>
8
<body style="height:1500px;padding:20px;">
9
10
<h3>Magellan Options</h3>
11
<h5 class="subheader"> <code>threshold</code> 选项指定导航在什么时候需要固定位置。会根据滚动条滚动计算,默认为 0 (auto)。该实例中我们设置为 100</h5>
12
<hr>
13
14
<div data-magellan-expedition="fixed" data-options="threshold:100">
15
<dl class="sub-nav">
16
<dd data-magellan-arrival="page1"><a href="#page1">Page 1</a></dd>
17
<dd data-magellan-arrival="page2"><a href="#page2">Page 2</a></dd>
18
</dl>