CSS JS 下拉菜单:将悬停区域扩展到图像链接之外
我正在尝试复制 www.accenture.com 中看到的导航
,这就是我到目前为止所能够实现的: http://alfadesigntech.com/new/pages/inside-page-template.html
我使用了java脚本来显示/隐藏下拉菜单这实际上是一个隐藏的div,有更多内容链接。问题是,一旦我离开菜单按钮,下拉菜单就会再次隐藏。虽然我可以使用延迟 onmouseout,但这不是我正在寻找的解决方案。
根据我有限的知识,可能的解决方案是以某种方式扩展悬停区域以覆盖隐藏框。我怎样才能实现这个目标?有替代解决方案吗?
任何帮助将不胜感激..提前致谢..Ps
。我对 javascript 的了解有限。
I'm trying to replicate the navigation as seen in www.accenture.com
And this is what I've been able to achieve so far: http://alfadesigntech.com/new/pages/inside-page-template.html
I've used a java script to show/hide a drop-down menu which is actually a hidden div with more links. The problem is as soon as I leave the menu button, the drop-down menu hides again. While I can use a delay onmouseout, it is not the solution i'm looking for.
Possible solution as per my limited knowledge, is to somehow extend the hover area to cover the hidden box. How can I achieve this? Is there an alternate solution?
Any help will be hugely appreciated.. Thanks in advance..
Ps. I've a limited knowledge of javascripts.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将带有链接的 div 放置在一个带有触发锚点的容器中 - 它应该会有所帮助。
尽管它通常取决于特定的标记。
也可能的解决方案 - 当链接面板打开时 - 如果鼠标移出链接面板并且鼠标不在锚定图像上,则将其隐藏。
you can place your div with links in one container with its triggering anchor - it should help.
Although it often depends on particular markup.
Also possible solution - when links panel is open - you hide it if mouse out of it and mouse not over on anchor image.