如何在applet上显示弹出式内容?

时间:2023-01-27 23:11:28

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.

我的网站使用老式的Java applet作为关键内容。随着站点的成熟,我们在这个applet周围添加了额外的内容,包括悬浮内容和jQuery UI对话框。

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

问题是,这些悬停内容和对话框出现在applet下面,它们的内容被隐藏起来。

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.

我已经尝试了解决这个问题的常用方法,比如z-index和wmode=透明,但这些都不起作用。我也看到了这个问题的答案,说这是不可能的,但这些问题都是几年前的事了。

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

有没有人有任何建议,如何强制applet在其他内容,或任何其他聪明的变通方法?我已经创建了一个页面来隔离并演示这个问题——http://blog.ajcw.com/demo/displayapplet.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)

(对话框在页面的中心打开,因此您需要调整窗口的大小,以便在applet的顶部看到它)

Summary

总结

  • Both the jQuery UI dialog box and info hover need to appear above the applet
  • jQuery UI对话框和信息悬停都需要出现在applet之上。
  • I have tried z-index and wmode
  • 我尝试了z-index和wmode。
  • I cannot use an alternative to the applet
  • 我不能使用applet的替代品。
  • A jQuery workaround is acceptable
  • jQuery的解决方案是可以接受的。
  • Affects all browsers other than Firefox 3.6+
  • 影响除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.

我现在的解决方案是在弹出窗口激活时隐藏applet,但是我想找到一个更优雅的解决方案。

2 个解决方案

#1


1  

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.

对于记录,我使用了添加可见性的方法:当弹出内容在页面中启动时,隐藏到applet中。

#2


-1  

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.

您的div有一个位置:相对;财产也显示:没有;z - index与位置:绝对;也改变显示属性显示:块;例如。

#1


1  

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.

对于记录,我使用了添加可见性的方法:当弹出内容在页面中启动时,隐藏到applet中。

#2


-1  

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.

您的div有一个位置:相对;财产也显示:没有;z - index与位置:绝对;也改变显示属性显示:块;例如。