gpt4 book ai didi

css - 针对 css id 的类

转载 作者:行者123 更新时间:2023-11-28 13:49:17 26 4
gpt4 key购买 nike

我正在尝试在以下代码中定位 .page-has-children 类:

<div id="dc_jqverticalmegamenu_widget-2" class="widget sidebarwidget ">
<div class="dcjq-vertical-mega-menu" id="dc_jqverticalmegamenu_widget-2-item">
<ul id="menu-media-intellectual-property" class="menu">
<li id="menu-item-2674" class="page-has-children menu-item menu-item-type-post_type menu-item-object-page menu-item-2674">
<a href="http://saracens.staging.wpengine.com/commercial-clients/commercial-litigation/media-and-intellectual-property">Media and Intellectual Property</a>
<ul class="sub-menu">
<li id="menu-item-2672" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-2672">
<a href="http://saracens.staging.wpengine.com/commercial-clients/commercial-litigation/media-and-intellectual-property/it-and-software-disputes">IT and Software Disputes</a>
</li>
<li id="menu-item-2673" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-2673">
<a href="http://saracens.staging.wpengine.com/private-clients/civil-litigation/media-and-intellectual-property/trademarks-and-patents">Trademarks and Patents</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>

我尝试了多种变体,但我很确定这个应该有效:

#dc_jqverticalmegamenu_widget-%ID%-item li.page-has-children  {}

我也试过

div.dcjq-vertical-mega-menu li.page-has-children {
background: url(images/arrow-right.gif) no-repeat -3px 0px;
padding: 0 0 0 15px;
cursor: pointer;
}

我也试过这个论坛帖子的建议:http://css-tricks.com/forums/discussion/10960/target-a-class-inside-id/p1

它们都不允许我在有子项的菜单项上看到箭头。

最佳答案

你试过吗:

#dc_jqverticalmegamenu_widget-2 #dc_jqverticalmegamenu_widget-2-item #menu-media-intellectual-property .page-has-children {

}

关于css - 针对 css id 的类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11563193/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com