MaterializeCSS使行对齐

时间:2017-03-31 09:01:20

标签: html css materialize

我正在使用materializecss,我在网格系统中有产品。每个产品都包裹在div <div class="col s12 m6 l4" >中,但当产品的高度不同时,产品会交错排列。我想这样做,以便每行分开,产品对齐左侧。

enter image description here

1 个答案:

答案 0 :(得分:1)

您必须将其包装到.row

示例:

<div class="row">
   <div class="col s4">Your  Your contentYour contentYour contentYour contentYour contentYour contentYour contentYour contentYour contentYour contentYour contentYour contentYour contentYour content</div>
   <div class="col s4">Your content</div>
   <div class="col s4">Your content</div>
</div>
<div class="row">
   <div class="col s4">Your content</div>
   <div class="col s4">Your content</div>
   <div class="col s4">Your content</div>
</div>
<div class="row">
   <div class="col s4">Your content</div>
   <div class="col s4">Your content</div>
   <div class="col s4">Your content</div>
</div>

See this fiddle