源代码:
提交运行 »
<!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="http://www.fmpq.com/jscss/bootstrap/foundation.min.css"> <script src="http://www.fmpq.com/jscss/bootstrap/jquery.min.js"></script> <script src="http://www.fmpq.com/jscss/bootstrap/foundation.min.js"></script> <script src="http://www.fmpq.com/jscss/bootstrap/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>
测试结果: