如何在不必使用特定的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不幸的是,不,沒有這種結構 –