更改 Wordpress 中的当前菜单项 [英] Changing current-menu-item in Wordpress

查看:30
本文介绍了更改 Wordpress 中的当前菜单项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为一个客户设计一个网站,该网站有一个很长的菜单,它源于另一行.我想为第二行的菜单项添加不同的颜色,所以我只需要为这些菜单项更改当前菜单项 - 我最初为这些菜单项分配了一个 .nav2 类,以便更改上述项目的 a:hover.

I'm designing a website for a client which has a long menu, which stems to another line. I want to add a different colour for the menu items that are on the second line, so i need to change the current-menu-item only for those menu items - i assigned a class of .nav2 to those menu items originally in order to change the a:hover for said items.

如果有人能帮助我,那就太好了.

If anyone could help me with that it would be great.

推荐答案

因为你的问题非常令人困惑,所以我将在这里暗中试探:

I'm going to take a stab in the dark here as your question was very confusing:

.current-menu-item.nav2  {
    background: red;
}

这篇关于更改 Wordpress 中的当前菜单项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆