本文介绍了CSS“指针事件'属性替代IE浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个下拉导航菜单中点击它时,(这些标题打开一个下拉菜单上点击时),而其他应导航(这些不具有下拉列表,并直接导航)的一些标题不应导航到其他页面。然而,这两种类型有的href 定义为它们

I have a drop down navigation menu in which some of the title should not navigate to other page when clicked(these title open a drop down menu when clicked on) while others should navigate (these dont have dropdown and navigate directly).However, both types have href defined to them

要解决这个我添加了下面的CSS为前一种类型的标题

To solve this i added the following css for the former type of titles

pointer-events: none;

和它工作fine.But因为这个属性不支持IE,我寻找一些解决方法。
恼人的是,我没有获得和特权来改变HTML和JavaScript code 完全

and it is working fine.But since this property is not supported by IE, i am looking for some work-around.The annoying thing is that i don't have access and privilege to change the HTML and JavaScript code completely.

任何想法?

推荐答案

指针的事件是一个Mozilla破解,并在那里它在WebKit浏览器中实现,你不能指望看到它在IE浏览器的另一个万年前。

Pointer-events is a Mozilla hack and where it has been implemented in Webkit browsers, you can't expect to see it in IE browsers for another million years.

然而,有一个解决方案,我发现:

There is however a solution I found:

这使用了使用JavaScript的一些不为人所熟知/理解性能拿鼠标事件并将其发送到另一个元素的插件。

This uses a plugin that uses some not well known/understood properties of Javascript to take the mouse event and send it to another element.

也有另一种JavaScript解决方案。

There is also another Javascript solution here.

为2013年10月更新:显然这是即将在IE V11。 。感谢蒂姆。

Update for October 2013: apparently it's coming to IE in v11. Source. Thanks Tim.

这篇关于CSS“指针事件'属性替代IE浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-26 14:47
查看更多