子菜单不保持打开 [英] Submenu does not stay open

查看:123
本文介绍了子菜单不保持打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在下拉菜单中遇到一些问题。

当我悬停链接时,子菜单会滑出,但不会保持打开。

I have a little problem here with my dropdown menu.
When I hover a link, the submenu slides out but doesn't stay open.

这个问题与我的contentdiv元素有关,因为当我删除这个div它工作。但我找不到我的错误。

The problem has something to do with my "content" div element, because when I remove this div it works. But I can't find my error.

也许有人可以看看它。 ; - )

Maybe someone can have a look at it. ;-)

这里是菜单。

推荐答案

它与#content在#navigation之后的事实有关,它的z-index更高。如果你设置两个位置:相对,并将#navigation的z-index设置为比#content更高的值,它将如你所期望的那样工作。请参见 http://jsfiddle.net/tangibleJ/B4aDM/2/

It has to do with the fact the #content comes after #navigation and it's z-index is higher. If you set both position: relative and set the z-index of #navigation to a higher value than #content it'll work as you expect. See http://jsfiddle.net/tangibleJ/B4aDM/2/.

这篇关于子菜单不保持打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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