嗨,我只想在班級啤酒中選擇「鏈接」,但它總是從子菜單中選擇所有鏈接。我嘗試css只能選一個
.beers:first-child does not work
.beers a:nth-child(1) does not work
.beers a:first-of-type (this apply to all the links of sub-menu)
<ul>
<li class="beers"><a>Link</a> only here
<ul class="sub-menu">
<li ><a></a></li> not here
<li><a></a></li> not here
</ul>
</li>
<li ><a></a></li>
<li ><a></a></li>
</ul>
請幫我
您想選擇素t in CSS or Jquery –
我想在css中選擇它 – pexichdu