Foundation Grid - Stacked Horizontally
The following example creates a basic grid system that is tiled horizontally on PCs and tablet devices, and stacked horizontally on small devices such as mobile phones.
Instance
<!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://static.php.cn/assets/foundation-5.5.3/foundation.min.css"> <script src="http://static.php.cn/assets/jquery/2.0.3/jquery.min.js"></script> <script src="http://static.php.cn/assets/foundation-5.5.3/js/foundation.min.js"></script> <script src="http://static.php.cn/assets/foundation-5.5.3/js/vendor/modernizr.js"></script> </head> <body style="padding:20px"> <div class="row"> <h2>Foundation 网格</h2> <p>两列网格堆叠实例。</p> <p>重置浏览器窗口大小查看效果。</p> <div class="medium-6 columns" style="background-color:yellow;">php中文网</div> <div class="medium-6 columns" style="background-color:pink;">php中文网</div> </div> </body> </html>
Run instance»
Click the "Run instance" button to view the online instance
Tips: .small|medium|large-* The number in the class specifies the span number of columns. So, .small-1 spans 1 column, .small-4 spans 4 columns,
.small-6 spans 6 columns (50% width) etc. Note: Make sure that the sum of the number series is 12! |