如何在不必使用特定的div的情况下为“标签1”选择器?我认为#wrapper label:first-of-type
会做的伎俩,但似乎是选择每个标签。CSS - 父母下任何位置的第一个元素的选择器
<div id="wrapper">
<div class="row">
<div class="content-1">
<label>Label 1</label>
</div>
<div class="content-2">
<label>Label 2</label>
</div>
<div class="content-3">
<label>Label 3</label>
</div>
<div class="content-4">
<label>Label 4</label>
</div>
</div>
</div>
疑难杂症,所以真的没有办法只选择“包装的ID下的第一个标签”? – noclist
@noclist不幸的是,不,没有这种结构 –