SimpleModal 模态和 Java 小程序的 Z 顺序问题
我正在使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一般情况下可能无法解决您的问题。您所经历的情况通常称为“烧穿”,当某个元素使其自身可见时,即使更高的元素应该遮盖它,也会发生这种情况。
这种情况经常发生的其他情况:旧版本的 IE 和 iframe(iframe 上的 div 被烧穿)、Flash 电影(在大多数浏览器中)。
避免烧穿的常用技术是使用所谓的 iframe shim。垫片是一个 iframe,其大小适合较高的内容,但放置在其正下方,并位于其他所有内容之上。插件和 iframe 比其他元素更难烧毁 iframe。
话虽如此,我仍然认为垫片不太可能阻止小程序烧毁。因此,另一种方法是在启动对话框时隐藏所有小程序,然后在对话框关闭时恢复它们。
您可以将小程序移出屏幕、更改其可见性或显示类型。用 CSS 表示,这些选项是:
祝你好运!
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:
Good luck!