在悬停时更改子菜单的颜色

时间:2022-11-04 20:58:32

i am kind of beginner in CS

我是CS的初学者

but here's my problem i am already mange to add hover for main menu but the problem i want to unlink the hover code from the sub menu " children menu " as you can see http://egy-cash.com/beta/wordpress/ .. the hover code that apply to the main menu also apply to the drop-down menu

但这是我的问题我已经mange添加悬停主菜单但问题我想取消链接从子菜单“儿童菜单”的悬停代码,你可以看到http://egy-cash.com/beta/wordpress/ ..适用于主菜单的悬停代码也适用于下拉菜单

here 's the complete CSS file http://pastebin.com/x9jY2qMu

这是完整的CSS文件http://pastebin.com/x9jY2qMu

1 个解决方案

#1


0  

you used this css:

你用过这个css:

.omega-nav-menu a:hover 

that will affect any <a> inside your menu.

这将影响菜单中的任何

If insteed you use:

如果你有资格使用:

.omega-nav-menu > li > a:hover

you will target JUST the direct <a> children of your <li> element so it will work on your menu. try it out.

您将定位

  • 元素的直接子元素,以便它可以在您的菜单上工作。试试看。

  • For future references this article will help you greetly with the basics of css:http://code.tutsplus.com/tutorials/the-30-css-selectors-you-must-memorize--net-16048

    对于将来的参考文献,本文将帮助您快速了解css的基础知识:http://code.tutsplus.com/tutorials/the-30-css-selectors-you-must-memorize--net-16048

    #1


    0  

    you used this css:

    你用过这个css:

    .omega-nav-menu a:hover 
    

    that will affect any <a> inside your menu.

    这将影响菜单中的任何

    If insteed you use:

    如果你有资格使用:

    .omega-nav-menu > li > a:hover
    

    you will target JUST the direct <a> children of your <li> element so it will work on your menu. try it out.

    您将定位

  • 元素的直接子元素,以便它可以在您的菜单上工作。试试看。

  • For future references this article will help you greetly with the basics of css:http://code.tutsplus.com/tutorials/the-30-css-selectors-you-must-memorize--net-16048

    对于将来的参考文献,本文将帮助您快速了解css的基础知识:http://code.tutsplus.com/tutorials/the-30-css-selectors-you-must-memorize--net-16048