WordPress 菜单下拉
好的,所以我到处都找过了,但找不到任何东西。我知道我可能需要一些jquery之类的东西。我曾尝试在 wordpress.org 上询问,但那是浪费时间,因为我已经 2-3 天没有回复,所以现在我会在这里询问。
我的目标是有一个主菜单,显示它所在的活动页面,并有一个用于其他菜单项的下拉菜单。我已经弄清楚了。
我的下一件事是当父级或子级处于活动状态时显示父级的子菜单。有点想通了。当父级处于活动状态时,子菜单将通过 css 进行显示。
接下来,当父级两个处于活动状态和/或父级两个的子级处于活动状态时,如果我将鼠标悬停在任何其他菜单项上(天气是否有子菜单),我希望它返回到正常样式。如果它有一个子菜单,那么我希望它显示在适当的位置,而不是父菜单两个。
我想要实现的目标但他们不使用任何其他页面上的导航菜单的一个很好的例子是 MSN 那里主导航(新闻、夹带等)是我正在寻找的内容,但希望父菜单和/或子菜单在活动时显示,但在将鼠标悬停在带或不带子菜单的其他菜单项上时消失。
Ok so i have looked everywhere and can not find anything. I know i might need some jquery or something. I have tried asking over at wordpress.org but that was a waste of time as i have had no replies for 2-3 days so now i will ask here.
My goal is to have a main menu that shows the active page it is on and have a drop down for other menu items. I have that figured out.
My next thing is to have the child menu of a parent shown when parent or child is active. Kind of have the figured out. The child menu displays but by css when parent is active.
The next this when parent two is active and/or child of parent two is active i would like it to go back to normal style if i hover over any other menu item weather is has a child menu or not. If it has a child menu then i want it shown in place instead of parent two.
A somewhat good example of what i am trying to achieve but they dont use the nav menu on any other page is MSN there main nav (NEWS, Entrainment, etc.) is what i am looking for but want the parent and/or child menu shown if active but disappear when hovering over other menu items with or without child menu's.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
因此,我在某种程度上找到了解决方案,但已经发布了关于我的其他问题的另一个问题,如果您认为您可以提供帮助,请访问此问题,但对于其他人,这是我的解决方案,
您可以通过插入逗号来添加多个 id 或类(请参见下面的示例)
这是一个例子:
So i found the solution to some extent but have posted another question regarding my other issues if you think you can help then please visit this but for others here was my solution
you can add multiple id's or classes by inserting a comma (see example below)
here is an example: