Foundation 用於開發響應式的 HTML, CSS and JavaScript 框架。
Foundation 是一個易於使用、強大且靈活的框架,用於建立基於任何裝置上的 Web 應用。
Foundation 是一個以行動優先的流行框架。
Foundation 滑動導航 語法
說明:Off-Canvas 滑動導航現在逐漸在行動頁面變得越來越流行了 (點擊選單按鈕選單從左側滑出)
Foundation 滑動導航 範例
<!DOCTYPE html> <html> <head> <title>Foundation 实例</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> <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">Off-canvas 实例</h1> </section> </nav> <aside class="left-off-canvas-menu"> <ul class="off-canvas-list test"> <li><label>Heading</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>PHP中文网</h3> <p>一个梦想起航的地方!!!</p> </section> <a class="exit-off-canvas"></a> </div> </div> <!-- 初始化 Foundation JS --> <script> $(document).ready(function() { $(document).foundation(); }) </script> </body> </html>
執行實例 »
點擊 "執行實例" 按鈕查看線上實例