.row {
padding-left: 15px;
padding-right: 15px;
}
<div class="row">
<div class="col"> </div>
<div class="col"> </div>
<div class="col row">
<div class="col"> </div>
<div class="col"> </div>
</div>
</div>
我需要什么:
.row > .row
是不够的,因为它只影响一层深层次答案 0 :(得分:0)
只需使用.row, .row .row
.row {
padding: 15px;
border: 1px solid #ddd;
min-height: 10px;
}
.row,
.row .row {
padding: 0;
}
&#13;
<div class="row">
<div class="col"> </div>
<div class="col"> </div>
<div class="col row">
<div class="col"> </div>
<div class="col"> </div>
</div>
</div>
&#13;