简单教程
提交运行
代码编辑器:
<!DOCTYPE html> <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> <nav class="top-bar" data-topbar> <ul class="title-area"> <li class="name"> <h1><a href="#">简单教程</a></h1> </li> <li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li> </ul> <section class="top-bar-section"> <ul class="left"> <li class="active"><a href="#">Home</a></li> <li><a href="#">Page 1</a></li> <li><a href="#">Page 2</a></li> <li><a href="#">Page 3</a></li> </ul> </section> </nav> <div style="padding:20px;"> <h3>顶部导航范例</h3> <p>顶部导航是在页面头部的导航</p> <p><strong>注意:</strong> 在小屏幕上工具条会被一个按钮取代 (修改浏览器窗口大小,查看效果)</p> <p>在按钮被点击后导航项将显示</p> </div> <script> $(document).ready(function() {$(document).foundation();}) </script>
运行结果: