SimpleModal 模态和 Java 小程序的 Z 顺序问题

发布于 2024-11-18 20:44:37 字数 167 浏览 3 评论 0原文

我正在使用 SimpleModal 在我的网络应用程序中显示弹出模式对话框。我在其中显示模式的页面也有一个 Java 小程序,占据了页面的大部分空间。当显示 SimpleModal 模式时,它们位于小程序下方。

以前有人遇到过这个问题吗?如果有,你是如何解决的?

非常感谢任何建议。谢谢!

I'm using SimpleModal to display pop-up modal dialogs in my web app. The page in which I'm displaying the modals also has a Java applet that occupies much of the page. When the SimpleModal modals are displayed, they are layered below the applet.

Has anyone run into this before, and if so, how did you resolve?

Any advice is most appreciated. Thanks!

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

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

发布评论

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

评论(1

情场扛把子 2024-11-25 20:44:37

一般情况下可能无法解决您的问题。您所经历的情况通常称为“烧穿”,当某个元素使其自身可见时,即使更高的元素应该遮盖它,也会发生这种情况。

这种情况经常发生的其他情况:旧版本的 IE 和 iframe(iframe 上的 div 被烧穿)、Flash 电影(在大多数浏览器中)。

避免烧穿的常用技术是使用所谓的 iframe shim。垫片是一个 iframe,其大小适合较高的内容,但放置在其正下方,并位于其他所有内容之上。插件和 iframe 比其他元素更难烧毁 iframe。

话虽如此,我仍然认为垫片不太可能阻止小程序烧毁。因此,另一种方法是在启动对话框时隐藏所有小程序,然后在对话框关闭时恢复它们。

您可以将小程序移出屏幕、更改其可见性或显示类型。用 CSS 表示,这些选项是:

/* send off-screen */
position: absolute;
left: -1000em;

/* change visibility */
visibility: hidden;

/* change display */
display: none;

祝你好运!

It may not be possible to solve your problem in the general case. What you're experiencing is commonly referred to as "burn through" and happens when an element makes itself visible even when a higher element should obscure it.

Other cases where this commonly occurs: older versions of IE and iframes (divs over the iframes are burned through), Flash movies (in most browsers).

A common technique for averting burn through is using what's called an iframe shim. A shim is an iframe which is sized to the higher content, but placed immediately below it, and above everything else. Plug-ins and iframes have a harder time burning through iframes than other elements.

Having said all that, I still think it's unlikely that the shim will prevent applet burn through. So one other approach would be to hide any applets at the time you launch the dialog, then restore them when the dialog closes.

You could either move the applet off-screen, change it's visibility, or display type. Expressed as CSS, these options are:

/* send off-screen */
position: absolute;
left: -1000em;

/* change visibility */
visibility: hidden;

/* change display */
display: none;

Good luck!

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