Foundation Grid - Large Devices


In the previous chapter we introduced the grid layout of medium-sized devices and small devices. The ratio used on small devices is 25%/75% (.small-3 and .small-9), but on medium-sized devices The ratio is 50%/50% (.medium-6 and .medium-6):

<div class="small-3 medium-6 columns">....< ;/div>
<div class="small-9 medium-6 columns">....</div>

On large devices our recommended ratio is 33%/66%.

Tip: The screen size definition for large devices is greater than 64.0625em.

Use the .large-* class on large devices.

Now we add two columns on the large device:

<div class="small-3 medium-6 large-4 columns">....< /div>
<div class="small-9 medium-6 large-8 columns">....</div>

Analysis

  • The ratio of the two columns for small devices is 25%/75% (.small-3 and .small-9)

  • The ratio of the two columns of medium-sized equipment is 50%/50% (.medium-6 and .medium-6)

  • The ratio of the two columns of large devices is 33%/66% (.large-4 and .large-8)

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>

<div class="row">
  <h2>Foundation 网格</h2>
  <p>大型设备上的比例为 33%/66%, 中型设备比例为 50%/50% ,小型设备比例为 25%/75% 。</p>
  <p>重置浏览器窗口大小查看效果。</p>
  <div class="small-3 medium-6 large-4 columns" style="background-color:yellow;">
    <p>php中文网</p>
  </div>
  <div class="small-9 medium-6 large-8 columns" style="background-color:pink;">
    <p>php中文网</p>
  </div>
</div>

</body>
</html>

Run Instance»

Click the "Run Instance" button to view the online instance

NoteNote: Make sure the number sequence adds up to 12 columns!

Use on large devices

In the following example we specify the .large-6 class (not .medium-* and .small-*). This indicates a 50%/50% ratio on larger devices. But will stack horizontally (100% width) on medium or small devices:

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>
<div class="row">
  <h2>Foundation 网格</h2>
  <p>大型设备上的比例为 50%/50%。小型和中型设备会水平堆叠(100%)。</p>
  <p>重置浏览器窗口大小查看效果。</p>
  <div class="large-6 columns" style="background-color:yellow;">
    <p>php中文网</p>
  </div>
  <div class="large-6 columns" style="background-color:pink;">
    <p>php中文网</p>
  </div>
</div>

</body>
</html>

Running Instance»

Click the "Run Instance" button to view the online instance