Zurb Foundation 5: Grid Column Stacking

家住魔仙堡 提交于 2019-12-06 11:49:08

问题


I'm new to foundation and I only have the basic idea on how to use grids.

I have these 3 columns that need to be stacked (see "mobile" image) when viewed on mobile/small screens.

It should look something like this when in larger screens:

Here's my current code. It's not quite what I wanted, and I'm starting to get confused.

<div class="row">
    <div class="large-12" style="background-color:#bdc3c7;">
      <div class="medium-4 medium-push-8 columns" style="background-color: #1abc9c; border: 1px solid #2c3e50;">
        <p>TOP ROW</p>
      </div>

      <div class="medium-8 medium-pull-4 columns" style="background-color: #e74c3c; border: 1px solid #2c3e50; height: 250px;">
        <p>MIDDLE ROW</p>
      </div>

      <div class="medium-4 columns" style="background-color: #9b59b6; border: 1px solid #2c3e50;">
        <p>BOTTOM</p>
      </div>
    </div>
</div>

回答1:


This grid system will work for large and small screens

   <div class="row">
     <div class="small-12 large-8 columns"></div>
     <div class="small-12 large-4 columns"></div>
     <div class="small-12 large-4 columns"></div>
   </div>



回答2:


Try this (the blocks will flow in the correct order on small screens):

<div class="row">
    <div class="small-12 large-4 columns right">1</div>
    <div class="small-12 large-8 columns">2</div>
    <div class="small-12 large-4 columns">3</div>
</div>


来源:https://stackoverflow.com/questions/23235668/zurb-foundation-5-grid-column-stacking

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!