IE10下设置了z-index,底层DIV绑定的事件仍然会触发
js世界 2017-11-30 01:52:47 代码如:
<html>
<head>
<style type="text/css">
img
{
position:absolute;
left:0px;
top:0px;
z-index:-10000;
}
</style>
</head>
<body>
<div style="width:100px;height:200px;border:1px solid red;">This is a heading</div>
<img src="/i/eg_smile.gif" onclick="alert(23)"/>
<p>由于图像的 z-index 是 -1,因此它在文本的后面出现。</p>
</body>
</html>
IE10下还会弹出23,谷歌不会