简单教程
提交运行
代码编辑器:
<!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> <div class="off-canvas-wrap" data-offcanvas> <div class="inner-wrap"> <nav class="tab-bar"> <section class="left-small"> <a class="left-off-canvas-toggle menu-icon" href="#"><span></span></a> </section> <section class="middle tab-bar-section"> <h1 class="title">侧滑菜单范例</h1> </section> </nav> <aside class="left-off-canvas-menu"> <ul class="off-canvas-list test"> <li><label>头部信息</label></li> <li><a href="#">Link 1</a></li> <li><a href="#">Link 2</a></li> <li><a href="#">Link 3</a></li> <li><a href="#">Link 4</a></li> <li><a href="#">Link 5</a></li> <li><a href="#">Link 6</a></li> <li><a href="#">Link 7</a></li> <li><a href="#">Link 8</a></li> </ul> </aside> <section class="main-section"> <h3>简单教程</h3> <p>简单教程,简单便阿城</p> </section> <a class="exit-off-canvas"></a> </div> </div> <script> $(document).ready(function() {$(document).foundation();}) </script>
运行结果: