通过图层/ div转发鼠标事件 [英] Forwarding Mouse Events through layers/divs

查看:136
本文介绍了通过图层/ div转发鼠标事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有人知道jQuery或本地JavaScript方式通过图层启用鼠标事件?例如启用 div 下的链接。

Does anybody know of either a jQuery or native JavaScript way to enable mouse events through layers? e.g. enable a link underneath a div.

在我的情况下无法使用的其他解决方案:

Other solutions that cannot use in my case:

  • A simple way, although using not really supported pointer-events (edit as of 2017, widely supported)
  • An ExtJS solution

推荐答案

你可以做到这一切,或者你可以使用这个该div的CSS:

You can do all that or you can just use this CSS for that div:

pointer-events:none

这篇关于通过图层/ div转发鼠标事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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