破碎的骨架网格 - 12列和4列

时间:2014-02-13 19:56:21

标签: css grid multiple-columns skeleton-css-boilerplate

我正在开发基于Skeleton的第一个css框架项目。到目前为止一切进展顺利,但似乎我坚持一件事。这是代码:

<div class="sixteen columns">
        <div class="clear spacernews"></div>
    </div>

    <div class="twelve columns">
            <div class="four columns newspoint">1</div>
            <div class="four columns newspoint">2</div>
            <div class="four columns newspoint">3</div>

    </div>
    <div class="four columns">
        <h3>Docs &amp; Support</h3>
        <p>The easiest way to really get started with Skeleton is to check out the full docs and info at <a href="http://www.getskeleton.com">www.getskeleton.com.</a>. Skeleton is also open-source and has a <a href="https://github.com/dhgamache/skeleton">project on git</a>, so check that out if you want to report bugs or create a pull request. If you have any questions, thoughts, concerns or feedback, please don't hesitate to email me at <a href="mailto:hi@getskeleton.com">hi@getskeleton.com</a>.</p>
    </div>

问题在于 - 当我只有十二和四列时,它很酷。但当我嵌套那些3x四列新闻点时,网格崩溃了。这是为什么?任何想法?

2 个答案:

答案 0 :(得分:2)

如果您需要三列,则表示您的课程错误。试试one-third column

另一件事是,如果您将列添加到列中,则必须将alpha和omega添加到第一列和最后一列。

答案 1 :(得分:0)

只需使用“column / columns omega”作为包装类。

<div class="column omega">
        <div class="four columns newspoint">1</div>
        <div class="four columns newspoint">2</div>
        <div class="four columns newspoint">3</div>
</div>

那没关系。