简体   繁体   English

带有子菜单悬停效果的菜单

[英]menu with sub-menu hover-over effect

I have the following lines in my website - http://codepen.io/anon/pen/LhDnu/ that creates a sidebar menu. 我的网站上有以下几行-http: //codepen.io/anon/pen/LhDnu/ ,可创建侧边栏菜单。

As the user hovers their mouse over a parent, listed item with child-links within it, a sub-menu appears. 当用户将鼠标悬停在上面列出的带有子链接的父项上时,将出现一个子菜单。

However, when the mouse moves over to select one of the child-links, it removes the sub-menu listed items. 但是,当鼠标移到其中一个子链接上时,它将删除子菜单中列出的项目。

How can I modify the codepen above so that it will allow the user to select one of the sub-menu items? 如何修改上面的代码笔 ,使用户可以选择子菜单项之一?

Here is a working code for you, in css dropdown menus try to work with display:none & display:block not with the opacity 这是适合您的工作代码,在CSS下拉菜单中尝试使用display:nonedisplay:block而不是opacity

http://codepen.io/anon/pen/luGDK/ http://codepen.io/anon/pen/luGDK/

Nevermind. 没关系。 Here is the solution - http://codepen.io/anon/pen/LzpyK/ . 这是解决方案-http://codepen.io/anon/pen/LzpyK/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM