iframe shimming或ie6(及以下)选择z-index bug [英] iframe shimming or ie6 (and below) select z-index bug

查看:142
本文介绍了iframe shimming或ie6(及以下)选择z-index bug的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗯我不确定是否有人遇到过这个问题


a简要介绍IE6上的任何< select> 对象是否显示在任何问题上其他项目,甚至是div ...意思是如果你有一个花哨的javascript效果,显示一个div应该在所有东西之上(例如:lightbox,multibox等等)onclick某个元素并且div重叠< select> 您的div get显示为好像它在< select> 下[在这种情况下是最大值和最小z-index不起作用]

Uhm I'm not sure if anyone has encountered this problem
a brief description is on IE6 any <select> objects get displayed over any other item, even div's... meaning if you have a fancy javascript effect that displays a div that's supposed to be on top of everything (e.g: lightbox, multibox etc..) onclick of a certain element and that div overlaps a <select> your div get's to be displayed as if it's under the <select> [on this case a max and minimum z-index doesn't work ]

我试过谷歌搜索并发现iframe垫片解决方案

但我想要一些非常干净的替代品
或更好还有谁找到了更好的解决方案?
因为使用iframes的方法使用大约130mb的ram可能会减慢穷人的机器速度

I've tried googling and found the iframe shim solution
but I wanted some pretty clean alternatives or better yet has anyone found a better solution? since the method using iframes uses around 130mb of ram might slow down poor people's machines

推荐答案

你没有使用循环隐藏每个选择。你需要的只是一个CSS规则:

You don't have to hide every select using a loop. All you need is a CSS rule like:

* html .hideSelects select { visibility: hidden; }

以下JavaScript:

And the following JavaScript:

//hide:
document.body.className +=' hideSelects'

//show:
document.body.className = document.body.className.replace(' hideSelects', '');

(或者,您可以使用自己喜欢的 addClass / removeClass implementation)。

(Or, you can use your favourite addClass / removeClass implementation).

这篇关于iframe shimming或ie6(及以下)选择z-index bug的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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