CSS子菜单消失得太快 [英] CSS Submenu Disappearing too quickly

查看:128
本文介绍了CSS子菜单消失得太快的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在此站点的菜单上编辑了CSS:

因此它将完全显示在我想要的字体大小上(以前它变成了一个两层菜单).但是,由于某种原因,现在很难单击显示您的支持"下的子菜单.当您将鼠标悬停并尝试将鼠标移至某个选项时,它会消失一半时间,然后您才能单击任何内容.

我玩过Chrome(检查元素)中的代码,但似乎无法找出问题所在.有人可以帮我吗?

谢谢.

解决方案

菜单与子菜单的显示位置之间存在间隙.参见下图:

当您将鼠标悬停在菜单项之外,并且鼠标移至子菜单时,鼠标将不再处于悬停"状态(越过空白),从而使子菜单消失.

如果您可以消除间隙(即子菜单位于页面上方的位置),则悬停"状态将保持在鼠标移动状态,并且子菜单将保持显示"状态以供单击. /p>

有帮助吗?

PS 作为答案发布(而不是发表评论),这样我就可以在说明中加入图片了.

I have edited the CSS on my menu on this site:

So it would display completely across at the font size I want (previously it was turning into a two layer menu). However, now for some reason the submenu under "Show Your Support" is very difficult to click on. When you hover and try to move your mouse down to an option it disappears half the time before you can click on anything.

I have played around with the code in Chrome (inspect element) and I can't seem to find out what is wrong. Can someone assist me, please?

Thank you.

解决方案

There is a gap between the menu and where the sub-menu appears. See Image below:

When you hover away from the menu item and the mouse is on its way to the sub-menu, the mouse ceases to be on 'hover' (while crossing over the gap) - making the sub-menu disappear.

If you can eliminate the gap (i.e. place where the sub-menu is positioned higher up the page), the 'hover' state will remain on mouse-move and the sub-menu will stay 'shown' for clicking.

Does that help?

PS posted as an answer (instead of comment) so I could include the image in my explanation.

这篇关于CSS子菜单消失得太快的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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