第一個元素的CSS選擇器我有這個東西的內部
<div class="foo">
<input type="text" name="bar" value="" />
<a href="javascript:void(0)">foobar 1</a>
</div>
<div class="foo">
<input type="text" name="bar" value="" />
<a href="javascript:void(0)">foobar 2</a>
</div>
<div class="foo">
<input type="text" name="bar" value="" />
<a href="javascript:void(0)">foobar 3</a>
</div>
<!-- I'm trying with this CSS, but with no luck -->
<style>
.foo a:first-child {
display:none;
}
</style>
我怎麼只能顯示foobar 2
和foobar 3
鏈接?
工作!謝謝 –