HTML:
<div class="plan-box">
<h3>...</h3>
<p>...</p>
</div>
<div class="plan-box">
<h3>...</h3>
<p>...</p>
</div>
CSS :
.plan-box:last-of-type {
...
}
在上面的CSS代码中,如果我在last-of-type
上使用last-child
或.plan-box
css选择器,则会在last-child
div中选择.plan-box
该段落还是会在HTML代码中选择第二个.plan-box
div?
答案 0 :(得分:2)
答案 1 :(得分:1)