层下闪烁,点击
我需要捕获 Flash 对象顶部的悬停事件,因此我设置了 wmode
并在其顶部创建了一个不可见的 div
以附加事件侦听器。
问题是,我无法单击 Flash 对象。封面正在吞噬点击声,而我试图解决这个问题的事情却使悬停事件变得一团糟。
对于这种情况是否有既定的解决方案或可以提供帮助的想法?这是我在 2 天内遇到的第 30 个问题,它快把我逼疯了 xD。
提前致谢!
I need to catch a hover event on top of a flash object, so I set the wmode
and created an invisible div
on top of it to attach the event listeners to.
Thing is, I can't click the flash object. The cover is swallowing the clicks, and the things I've tried to go around this have made a mess of the hover events.
Is there an established solution to this kind of scenario, or ideas that could help? This is the 30th problem I ran into in 2 days time and it's driving me crazy xD.
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
解决了。我刚刚取下盖子,将监听器连接到另一个不显眼的容器中,其中包含更多的 div,然后是 flash 对象。
该封面是解决另一个问题时剩下的,不再需要了。不管怎样,谢谢你们!
Solved. I just removed the cover and attached the listeners to another, unobstrusive container, holding some more divs and then the flash object.
The cover was a leftover from a solution to another problem, and was no longer needed. Thanks anyway, guys!
我知道您很久以前就解决了您的解决方案,但从它的声音来看,您也可以使用代码
pointer-events: none;
来解决您的问题。这将使咔哒声直接穿过盖子。请参阅文档
I know you solved your solution a long time ago but by the sounds of it, you could have also used the code
pointer-events: none;
to solve your problem. This would have allowed the clicks to pass straight through the cover.See the docs