指针事件:无,过滤器,工作在ie8和任何地方,不是ie9 [英] Pointer events: none, filter, works in ie8 and anywhere, not ie9

查看:160
本文介绍了指针事件:无,过滤器,工作在ie8和任何地方,不是ie9的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如我在这里看到的,过滤器可用于模拟跨浏览器版本的

As I have seen here, a filter can be used to simulate a cross browser version of

pointer-events: none;

然而,这只是在IE9不工作,也不在模拟IE8版本在IE9。然而,IE8的本机安装处理它。有没有任何解决方案,使它工作的IE9?

However, this just doesn't work in IE9, nor does it in the "emulate IE8" version in IE9. A native installation of IE8 handles it fine, however. Is there any solution that makes it work for IE9?

推荐答案

你说得对 - AlphaImageLoader过滤器已从IE9中删除。 这样做是为了不与标准兼容的方法冲突。在这种情况下, pointer-events:none ,其中现在可在IE9中使用

You're right - AlphaImageLoader filter has been removed from IE9. This was done so that it doesn't conflict with the standards compliant methods. In this case, pointer-events: none, which now works in IE9.

如果您使用条件注释来定位IE过滤器修复,将其更改为仅限IE8及以下版本。尝试将<! - [if IE]> 更改为<! - [if lte IE 8]>

If you're using a conditional comments to target IE for the filter fix, change them to target only IE8 and below. Try changing <!--[if IE]> to <!--[if lte IE 8]>

编辑:我之后再次遇到这个问题,显示 -events:none 在IE9中不起作用(无论如何不是HTML元素)。我认为这是工作,但在重新测试这两种方法都无法点击IE9。也许我有我的IE9在兼容模式。

I've since come across this again and it appears that pointer-events: none does not work in IE9 (not for HTML elements anyway). I thought this was working, but on re-testing neither method works for click-through on IE9. Perhaps I had my IE9 in a compatibility mode.

这不是理想的,但你可以通过< meta> ; 标记切换:

It's not ideal at all, but you could force IE9 into IE8 mode via the <meta> tag switch:

 <!--[if ie 9]><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"><![endif]-->

对于错误信息抱歉,我会继续研究这个。

Apologies for the misinformation, I'll keep looking into this.

2012年9月24日更新:

Update Sept 24 2012:

奇妙有用 caniuse.com 有关于指针事件的更多信息。在IE10中的支持仍然未知,似乎Opera不支持此属性。我建议现在不要使用 pointer-events ,除非你专门针对Webkit / Mozilla。

The wonderfully useful caniuse.com has more information on pointer-events for HTML. Support in IE10 is still unknown and it appears that Opera does not support this property either. I would advise against using pointer-events for now unless you're specifically targeting Webkit/Mozilla.

这篇关于指针事件:无,过滤器,工作在ie8和任何地方,不是ie9的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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