是否可以在第一个和最后一个元素上放置圆角?

时间:2014-07-11 08:16:07

标签: html css

<div id='stages'>
    <div class="stage">
    stuff here
    </div>
    <div class="stage">
    more stuff here
    </div>
    <div class="stage">
    more stuff here
    </div>
</div>

我想在第一个&#34; stage&#34;上放置顶角,在最后一个&#34; stage&#34;上放置一个倒圆角。这有可能用CSS吗?

1 个答案:

答案 0 :(得分:-2)

使用此选择器:

.stage:first-child
.stage:last-child
相关问题