如何保持下拉菜单在ActiveX的顶部 [英] How to keep dropdown menu on top of ActiveX

查看:194
本文介绍了如何保持下拉菜单在ActiveX的顶部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在所有网页上都有一个由JavaScript创建的下拉菜单,某些列最多有20个项目。此下拉列表显示在Mozilla浏览器中的所有内容的最上方,但在Internet Explorer中,当ActiveX对象显示在其下方时,它会被部分覆盖。

I have a drop-down menu created by JavaScript on all pages and some columns have up to 20 items. This drop-down appears topmost over all content in Mozilla browsers but in Internet Explorer it gets partially covered when an ActiveX object is displayed just below it.

ActiveX在DIV层和设置z索引,但到目前为止我还没有找到一个解决方案工作。向对象标签添加样式没有效果...

I have tried displaying the ActiveX in a DIV layer and setting z-index but so far I haven't found a solution that works. Adding style to the object tag had no effect...

<object etc style='z-index:3;'>

将样式应用到包含对象的DIV也没有效果...

Applying style to a DIV containing the object also had no effect...

<div align="center" style="z-index:2;">

下拉菜单应用了z-index = 1。向对象添加wmode参数也不起作用...

The dropdown menu has a z-index=1 applied. Adding a 'wmode' parameter to the object also did not work...

<param name='wmode' value='transparent'>


推荐答案

显然,问题是进程内 - 进程插件。进程内插件(和activex)将在与网页本身相同的环境中运行,并遵守z顺序。但在进程是罕见的。大多数浏览器在单独的进程中运行插件和ActiveX,因此网页在一个进程中,并且activex / plugin位于不同的进程中。浏览器使它APPEAR像一个单一的过程,通过使插件/ activex在包含网页的屏幕区域绘制自己,但你理解它的烟雾和镜子和z排序几乎被忽略。它绘制网页(包括菜单),然后它会导致插件/ activex绘制。

Apparently the issue is in-process vs out-of-process plugins. In-process plugins (and activex) will run in the same environment as the web page itself and honour z-ordering. But in-process is rare. Most browsers run plugins and activex in a separate process, so the web page is in one process and the activex/plugin is in a different process. The browser makes it APPEAR like it’s a single process by causing the plugin/activex to DRAW itself in the screen area containing the web page, but you understand its smoke and mirrors and z-ordering is practically ignored. It draws the web page (including menus) and THEN it causes the plugin/activex to draw.

它唯一的方法(并不总是工作)将html菜单包装在iframe中。

The only way around it (and doesn’t always work) is to wrap the html menu in an iframe.

这篇关于如何保持下拉菜单在ActiveX的顶部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆