不计算元素的位置,然后发射自己的“事件”。当元素被另一个元素覆盖时,有没有办法获得一个mouseover事件?
original fiddle (can be fixed with z-index)
better fiddle (a situation where z-index can't work)
<div class='under'></div>
<div class='over'></div>
.over {
display:inline-block;
position:absolute;
height:100px;
width:100px;
background: rgba(0, 255, 0, .3);
}
.under {
display:inline-block;
position:absolute;
height:26px;
width:26px;
top:37px;
left:37px;
background:rgba(0, 0, 255, 1);
}
我想不,但我可以问你为什么使用它? –
只是要清楚,你是否想让绿色在Y盘旋的同时成为Y? –
A [hack](http://jsfiddle.net/GLCPV/1/)为原始案例。虽然FF中的结果似乎闪烁,但其他所有浏览器都正常工作... – Teemu