我試圖去排隊頁腳菜單,只選擇第一個列表元素作爲單一選擇joomla的5 col footer菜單的css選擇器?
<ul class="someclass">
<li><!--this is what I am trying to capture-->
<a>something arbitrary here</a>
<ul>
<li>list elemnts here</li>
<li>list elemnts here</li>
<li>list elemnts here</li>
<li>list elemnts here</li>
</ul>
</li>
<li>
<a>something arbitrary here</a>
<ul>
<li>list elemnts here</li>
<li>list elemnts here</li>
<li>list elemnts here</li>
<li>list elemnts here</li>
</ul>
</li>
<li>
<a>something arbitrary here</a>
<ul>
<li>list elemnts here</li>
<li>list elemnts here</li>
<li>list elemnts here</li>
<li>list elemnts here</li>
</ul>
</li>
</ul>
我希望能夠選擇所有頂部<li>
元素,而不直接選擇每隔內飾<li>
元素。我應該使用哪個css選擇器?
'ul.someclass:first-child {...}'? – Vucko 2013-03-02 12:19:13