是否可以仅定位CSS下面的“下拉父菜单”链接(我无法修改下面的代码)?
我想要定位的代码行,以便我可以在CSS中修改它:
<li class="page_item page-item-8"><a href="http://www.kb8b.com/?page_id=8">Pulldown Menu Parent</a>
page-item-8类是动态生成的,所以我不能依赖它。
完整的代码是:
<div id="access" role="navigation">
<div class="skip-link screen-reader-text"><a href="#content" title="Skip to content">Skip to content</a></div>
<div class="menu">
<ul>
<li class="current_page_item"><a href="http://www.kb8b.com/" title="Home">Home</a></li>
<li class="page_item page-item-19"><a href="http://www.kb8b.com/?page_id=19">Contact</a></li>
<li class="page_item page-item-8"><a href="http://www.kb8b.com/?page_id=8">Pulldown Menu Parent</a>
<ul class='children'>
<li class="page_item page-item-9"><a href="http://www.kb8b.com/?page_id=9">Test Page 2</a></li>
<li class="page_item page-item-11"><a href="http://www.kb8b.com/?page_id=11">Test Page 3</a></li>
<li class="page_item page-item-13"><a href="http://www.kb8b.com/?page_id=13">Test Page 4</a></li>
<li class="page_item page-item-15"><a href="http://www.kb8b.com/?page_id=15">Test Page 5</a></li>
<li class="page_item page-item-17"><a href="http://www.kb8b.com/?page_id=17">Test Page 6</a></li>
</ul>
</li>
</ul>
</div>
</div><!-- #access -->
如何在CSS中访问上面的Pulldown Menu Parent链接?
答案 0 :(得分:1)