使用 jQuery Superfish 菜单插件解决 IE7 中的 Z-index 问题

发布于 2024-07-25 20:48:20 字数 260 浏览 4 评论 0原文

我需要修改 jQuery Superfish 菜单插件以适应菜单图像的使用。

Om oss 和Medieomtale 下有子菜单。 我在这个菜单中使用了精灵图像。

它在 IE8、FF 等上运行良好。但是 IE7 有显示子菜单的问题。 它显示子菜单,但当我尝试在子菜单中导航时,它会淡出。

编者注

此问题中用于演示该问题的 www.okadadesign.no 链接已被删除,因为它不再可访问。

I needed to modify jQuery Superfish menu plugin to accommodate using image for the menu.

There are submenus under Om oss and Medieomtale. I used sprites images for this menu.

It works fine with IE8, FF etc. However IE7 has a problem to show submenus. It shows the submenu but when I try to navigate in the submenu, it fades out.

Editor's note

A link in this question to www.okadadesign.no to demonstrate the issue was removed, as it is no longer accessible.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

给不了的爱 2024-08-01 20:48:20

我通过添加以下内容修复了 IE7 和 IE6 的 z-index 问题:position:relative; z 索引:10000; 到包含(sf-menu)的主#nav div,工作就完成了。

I fixed the z-index problem for IE7 and IE6 by adding: position: relative; and z-index:10000; to the main #nav div that contains the (sf-menu) and the job was done.

笨笨の傻瓜 2024-08-01 20:48:20

我总是必须在 .sf-menu li li 上放置一个 z-index 才能让子菜单显示在 ie6/7 中。

使用 hoverIntent 也可能有所帮助。 superfish 页面上有详细信息。

I've always had to put a z-index on .sf-menu li li to get the sub-menus to show up in ie6/7.

Using hoverIntent might help too. There are details about on the superfish page.

超可爱的懒熊 2024-08-01 20:48:20

它也可能像没有在 .sf_menu li ul 上指定“背景”一样愚蠢。 我使用了渐变(IE 中的过滤器)并且没有指定原始背景颜色。

  background: #F3F3F3; /* required for IE to retain hover state */
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#F3F3F3', endColorstr='#D8D8D8');
  background: -webkit-gradient(linear, left top, left bottom, from(#F3F3F3), to(#D8D8D8));
  background: -moz-linear-gradient(top,  #F3F3F3,  #D8D8D8);

It also might be something as stupid as not specifying a "background" on .sf_menu li ul. I was using a gradient (filter in IE) and didn't specify the original background color.

  background: #F3F3F3; /* required for IE to retain hover state */
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#F3F3F3', endColorstr='#D8D8D8');
  background: -webkit-gradient(linear, left top, left bottom, from(#F3F3F3), to(#D8D8D8));
  background: -moz-linear-gradient(top,  #F3F3F3,  #D8D8D8);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文