从最后一个子CSS删除边框 [英] Remove border from last child css
本文介绍了从最后一个子CSS删除边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
考虑此标记:
<div class="container">
<div class="row first">
<div class="col-lg-6 flush-col">
<div class="thumbnail-services">
<h3>Design</h3>
</div>
</div>
<div class="col-lg-6 flush-col">
<div class="thumbnail-services">
<h3>Design</h3>
</div>
</div>
</div>
<div class="row second">
<div class="col-lg-6 flush-col">
<div class="thumbnail-services">
<h3>Design</h3>
</div>
</div>
<div class="col-lg-6 flush-col">
<div class="thumbnail-services">
<h3>Design</h3>
</div>
</div>
</div>
</div>
这里是 fiddle
我想要的是删除最后两列的右边框第一行,第二行最后一行)
What I want is to remove the right border on those two last columns (last one on the first row and last one on the second row)
我试过使用:
.thumbnail-services:last-child {border-right:0px;} but is not working.
任何想法我应该怎么做使这个工作与css伪元素 :last-child
?
Any idea what should I do to make this work with the css pseudo element :last-child
?
推荐答案
thumbnail-services
不是行的最后一个子元素,但 flush-col
(或一般的列)是。
thumbnail-services
is not the last child of the row, but flush-col
(or the columns in general) are. Select these instead.
.flush-col:last-child .thumbnail-services
http://jsfiddle.net / C8buA / 1 /
这篇关于从最后一个子CSS删除边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文