在此bootply中,我希望每个3n + 1 col-lg-4
都被清除。它在col-lg-12
不存在时起作用,但是这违背了nth-of-type no的目的?
有人可以指出我在这里做错了吗?
<div class="container">
<div class="row">
<div class="col-lg-12">col12 ignore</div>
<div class="col-lg-4">a</div>
<div class="col-lg-4">b</div>
<div class="col-lg-4">c</div>
<div class="col-lg-4">d</div>
</div>
</div>
.col-lg-4:nth-of-type(3n+1){
clear: left;
color: red;
}
提前致谢