【发布时间】:2014-11-20 18:14:40
【问题描述】:
我有 uls 的两个不同的“层”(正确的术语是什么???),我想选择仅在第一个标签内的 a 标签。
<div>
<ul>
<li>
<a>Here's what I'm trying to apply a certain style to</a>
<ul>
<li>
<a>Here's what I'm not trying to apply that certain style to</a>
</li>
</ul>
</li>
</ul>
</div>
所以我知道我不能只做div ul li a,因为那会包括内部的a 标签。
【问题讨论】:
标签: html css css-selectors