源代碼
點擊運行
<!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.staticfile.org/foundation/5.5.3/css/foundation.min.css"> <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script> <script src="https://cdn.staticfile.org/foundation/5.5.3/js/foundation.min.js"></script> <script src="https://cdn.staticfile.org/foundation/5.5.3/js/vendor/modernizr.js"></script> <style> .example { max-width: 100%; } </style> </head> <body> <h2>Foundation 網格</h2> <p>默認情況下,網格最大(<code>.row</code>) 寬度為 62.5rem。在寬屏上,當寬度大於 62.5rem, 列不會跨越頁面的寬度, 即使寬度設定為 100%。但你可以通過 CSS 重新設置 max-width:</p> <hr> <div class="row"> <p>基本行 (max-width:62.5rem):</p> <div class="small-6 columns" style="background-color:yellow;">.small-6</div> <div class="small-6 columns" style="background-color:pink;">.small-6</div> </div> <br> <div class="row example"> <p>行的max-width為 100% :</p> <div class="small-6 columns" style="background-color:yellow;">.small-6</div> <div class="small-6 columns" style="background-color:pink;">.small-6</div> </div> <br> </body> </html>
運行結果