materialize css:删除网格之间的间隙/空间

时间:2017-12-09 10:38:03

标签: html css material-design materialize

有没有想法如何消除网格之间的间隙/空间? 这是每列的代码示例,它将显示网格之间的间隙/空间

<div class="row">
  <div class="col s4">
    <div class="card-panel light-blue">4</div>
  </div>
  <div class="col s4">
    <div class="card-panel light-blue">4</div>
  </div>
  <div class="col s4">
    <div class="card-panel light-blue">4</div>
  </div>
</div>

enter image description here

1 个答案:

答案 0 :(得分:3)

尝试在主css文件中将padding: 0;添加到.row .col.s4

.row .col.s4 {
  padding: 0;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css">
<div class="row">
  <div class="col s4">
    <div class="card-panel light-blue">4</div>
  </div>
  <div class="col s4">
    <div class="card-panel light-blue">4</div>
  </div>
  <div class="col s4">
    <div class="card-panel light-blue">4</div>
  </div>
</div>