微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

突出显示父级导航元素

如何解决突出显示父级导航元素

我希望在激活子菜单项(测试2)时突出显示父导航菜单(Test1):

1

使用以下代码,仅当我将鼠标悬停在鼠标上时,我才能修改指针。

.elementor-widget-nav-menu .elementor-nav-menu--main .current-menu-parent:not(.e--pointer-framed)  
.elementor-item:after  
{background-color: yellow !important;}

即使将鼠标从导航菜单上移开,我还需要更改哪些内容以保持黄色下划线?

致谢

解决方法

我找到了解决方法:

body[data-elementor-device-mode=desktop] header.sticky-header .elementor-widget-nav- 
menu .elementor-nav-menu--main .current-menu-parent:not(.e--pointer-framed) 

.elementor-item.has-submenu:not(:hover):not(:focus):not(.elementor-item- 
active):not(.highlighted)::before,.elementor-widget-nav-menu .elementor-nav-menu--main .current-menu-parent:not(.e-- 
pointer-framed) 


.elementor-item.has-submenu:not(:hover):not(:focus):not(.elementor-item- 
active):not(.highlighted)::after 
{ 
opacity: 1;
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。