0

请帮忙。

我正在使用 Bourbon Neat 1.7 并尝试添加和显示第二行。当前显示的所有信息都显示在一行上,应该是 2 行。我的计划是附加一个记录集并逐行显示记录。

我的scss代码

.third {
    @include outer-container;
    background-color: #afa;

    .alpha3 {
        @include fill-parent();
        @include row(table);
        margin-bottom: 0;
        padding: 0;
        background-color: #aaf;

        .aside3 {
            @include span-columns(4);
            @include pad();
            border: 1px solid black;
            background-color: #faa;
        }

        .article3 {
            @include span-columns(8);
            @include pad();
            @include reset-display;
            background-color: #faa;
        }
    }
}

HTML 代码

<div class="third">
    <p>div class third  </p>
    <div class ="alpha3">
        <div class ="aside3">
            <p>1st Col 1st row </p>
        </div>
        <div class ="article3">
            <p>2nd Col 1st row</p>
        </div>
        <div class ="aside3">
            <p>1st Col 2nd row</p>
        </div>
        <div class ="article3">
            <p>2nd Col 2nd row</p>
        </div>
     </div>
</div>
4

1 回答 1

0

table显示中,行元素变成了一个表格(在这种情况下.alpha3),有效地尝试在不换行的情况下适应其所有子元素(表格不换行)。

您应该创建一个附加.alpha3元素来承载第二行。

<div class="third">
  <p>div class third</p>
  <div class ="alpha3">
     <div class ="aside3"><p>1st Col 1st row </p></div>
     <div class ="article3"><p>2nd Col 1st row</p></div>
  </div>

  <div class ="alpha3">
    <div class ="aside3"><p>1st Col 2nd row </p></div>
    <div class ="article3"><p>2nd Col 2nd row</p></div>
  </div>
</div>
于 2014-10-27T09:02:13.100 回答