案例:Foundation案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
  <title>Foundation 实例</title>
5
  <meta charset="utf-8">
6
  <meta name="viewport" content="width=device-width, initial-scale=1">
7
  <link rel="stylesheet" href="/css/foundation5.5.3/foundation.min.css">
8
  <script src="/js/bootstrap/jquery.min.js"></script>
9
  <script src="/js/foundation5.5.3/foundation.min.js"></script>
10
  <script src="/js/foundation5.5.3/modernizr.js"></script>
11
</head>
12
<body>
13
14
<div data-magellan-expedition="fixed">
15
<nav class="top-bar" data-topbar>
16
  <ul class="title-area">
17
    <li class="name">
18
      <h1><a href="#">WebSiteName</a></h1>
19
    </li>
20
    <!-- Collapsible Button on small screens: remove the .menu-icon class to get rid of icon. 
21
    Remove the "Menu" text if you only want to show the icon -->
22
    <li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
23
  </ul>
24
25
  <section class="top-bar-section">
26
    <ul class="left">
27
      <li data-magellan-arrival="page1"><a href="#page1">Page 1</a></li>
28
      <li data-magellan-arrival="page2"><a href="#page2">Page 2</a></li>
29
    </ul>
30
  </section>
31
</nav>
32
</div>
33
34
<div style="padding:20px;height:1500px;">
35
  <h3>Magellan 头部导航实例</h3>
36
  <p>向下滚动页面查看效果。</p>
37
38
<div style="height:200px;background-color:#1abc9c;color:white;">
39
  <h3 data-magellan-destination="page1">Page1</h3>
40
  <a name="page1"></a>
41
  <p>滚动屏幕,查看导航栏上的变化。</p>
42
</div>
43
44
<h3 data-magellan-destination="page2">Page2</h3>
45
<a name="page2"></a>
46
<p>滚动屏幕,查看导航栏上的变化。并尝试向上滚动。</p>
47
</div>
48