这是关于 jsfiddle 的示例:http: //jsfiddle.net/v6kuL/
如何将 Category1、Category2、Category3 更改为其他颜色?
HTML:
<ul>
<li>
<a href="/category/category1">Category 1</a>
<ul class="children">
<a href="/category/" >
<li>
<a href="/category/category1a">Category 1 A</a>
</li>
</a>
</ul>
</li>
<li>
<a href="/category/category2">Category 2</a>
</li>
<li>
<a href="/category/category3">Category 3</a>
<ul class="children">
<a href="/category/" >
<li>
<a href="/category/category3a">Category 3 A</a>
</li>
<li>
<a href="/category/category3b">Category 3 B</a>
</li>
</a>
</ul>
</li>
</ul>
我的尝试是在上面链接的 jsfiddle 上。