如何在小程序顶部显示弹出内容

发布于 2024-10-30 14:24:19 字数 875 浏览 2 评论 0原文

我的网站使用老式 Java 小程序作为关键内容。随着网站的成熟,我们正在围绕此小程序添加额外的内容,其中包括悬停内容和 jQuery UI 对话框。

问题是这些悬停内容和对话框出现在小程序下方,并且它们的内容被遮挡。

我尝试了常见的方法来解决该问题,例如 z-indexwmode=transparent 但这些都不起作用。我还看到这个问题的答案,说它不是有可能,但这些问题已经有几年了。

有没有人有任何建议如何强制小程序落后于其他内容,或任何其他聪明的解决方法?我创建了一个页面来隔离和演示问题 - http://blog。 ajcw.com/demo/display-behind-applet.htm

(该对话框在页面中央打开,因此您需要调整窗口大小才能在页面顶部看到它)小程序)

摘要

  • jQuery UI 对话框和信息悬停都需要出现在小程序上方
  • 我尝试过 z-indexwmode
  • 我无法使用小程序的替代方案
  • 可接受 jQuery 解决方法
  • 影响 Firefox 3.6+ 以外的所有浏览器

我当前的解决方案是在弹出窗口处于活动状态时隐藏小程序,但我想找到更优雅的解决方案。

My website uses old-school Java applets for a key piece of content. As the site matures we are adding extra content around this applet, which includes hover content and jQuery UI dialog boxes.

The problem is that these hover content and dialog boxes appear beneath the applet and their content is obscured.

I have tried the common ways to solve the problem, such as z-index and wmode=transparent but these do not work. I have also seen answers to this question that say it is just not possible, but these questions were a few years old.

Does anyone have any suggestions how to force the applet behind other content, or any other clever workarounds? I have created a page to isolate and demonstrate the problem - http://blog.ajcw.com/demo/display-behind-applet.htm

(the dialog opens in the centre of the page so you'll need to resize your window to see it on top of the applet)

Summary

  • Both the jQuery UI dialog box and info hover need to appear above the applet
  • I have tried z-index and wmode
  • I cannot use an alternative to the applet
  • A jQuery workaround is acceptable
  • Affects all browsers other than Firefox 3.6+

My current solution is to hide the applet when the pop-up is active, but I would like to find a more elegant solution.

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

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

发布评论

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

评论(2

陌伤浅笑 2024-11-06 14:24:19

根据原始帖子中引用的替代问题,这似乎仍然不可能。

作为记录,我使用了在页面内启动弹出内容时将 visibility:hidden 添加到小程序的解决方法。

It seems that it still isn't possible, as per the alternate question referenced in the original post.

For the record I have used the workaround of adding visibility:hidden to the applet when pop-up content is launched within the page.

颜漓半夏 2024-11-06 14:24:19

您的 div 有一个 position:relative; 属性,还有 display:none;
Z-index 与 position:absolute; 配合使用,还将显示属性更改为 display:block; 例如。

Your div has a position:relative; property and also display:none;
Z-index works with position:absolute; also change the display property to display:block; for exmaple.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文