4 columns to 2 columns with Twitter Bootstrap

前端 未结 4 1257
长情又很酷
长情又很酷 2021-02-08 06:22

I have a 4 columns fluid-layout:

A
4条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-08 06:51

    I found out that Zurb Foundation (http://foundation.zurb.com/docs/grid.php#threeBlockEx) offers this fonctionality, but I want to continue with Twitter Bootstrap. So I've managed to add a custom rule, based on the technique that Foundation uses :

    @media (min-width: 768px) and (max-width: 979px) {
        .row-fluid > [class*=span]:nth-child(2n+1) {
          clear: both;
          margin-left: 0;
        }
    }
    

提交回复
热议问题