触发点击下层元素(z-index) [英] Trigger click on lower element (z-index)
问题描述
可能重复:
点击链接低于较高的z-index div
我有一个小问题。我在我的代码中有几个div元素。
他们代表一种建筑物。现在你有一个前面的元素(门廊)和一个后面的元素(建筑)。
在后面的元素中会有一个电影,但是因为前面的元素(门廊)有一个更高的z-index按钮不会工作。
I have a small question. I have a few div elements in my code. They represent a kind of building. Now you have a front element (porch) and a back element (building). In the back element there will be a movie, but because the front element (porch) has a higher z-index the button will not work.
A解决方案可能是一个设置电影z索引更高(或将元素移动到前面),但因为有一个元素在前面和后面之间移动(元素必须在电影前面移动)我不能这样做。
A solution could be that a set the movie z-index higher (or move the element to the front), but because there is an element moving between the front and back (the element must move in front of the movie) i can not do this.
我想知道是否有任何解决方案可以触发来自具有较低z-index或结构较低的元素的点击。我听说有一个jquery插件来做到这一点,但我找不到它。
I wondered if there is any solution that you can trigger clicks from element that have a lower z-index or are lower in the structure. I heard there was a jquery plugin to do this, but I can not find it.
感谢
<div id="cases" class="chapter">
<div class="building sprite"></div>
<div class="porch sprite"></div>
<div class="movie">
<iframe width="695" height="435" src="http://www.youtube.com/embed/O9REMmhvjQw" frameborder="0" allowfullscreen></iframe>
</div>
</div>
推荐答案
查看此链接:
它使用一个已知的Javascript属性将鼠标事件从一个元素传递到另一个元素。
It deals with passing mouse events from one element to another using a littlwe known property of Javascript.
解决方案也是在这里。
这篇关于触发点击下层元素(z-index)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!