0
当我设置#wrap {height: 0; overflow: hidden}
时,应该隐藏内部锚定标记,因此点击阴影区域应该没有任何事情发生。铬盒子 - 影子错误?
我在Firefox和IE上测试了它。他们两人都很好。
但是在Chrome上,当我点击阴影区域时,我仍然收到警报窗口。
它是一个WebKit的错误?
以下是演示: http://jsbin.com/ofuxar/3
<div id="wrap">
<a href="#" onclick="alert('clicked')">click</a>
</div>
#wrap {
height: 0;
overflow: hidden;
position: absolute;
box-shadow: 0 10px 10px 10px black;
}
#wrap a {
display: block;
height: 100px;
}
你最好是说'display:none'而不是'height:0px' – Andrew
我没有很好地解释这个问题。对不起,我的英文。重新编辑问题。 – Chef