我有一个透明的div元素,z-index比同一页面上的img-element更高.但是,当涉及到点击事件时,Internet Explorer就像img-element将具有更高的z值一样.
<!DOCTYPE html>
<html>
<head>
<title>Demo</title>
</head>
<body style="margin:0;padding:0;">
<img src="7player.png" alt="7player" width="60" height="60" style="position:absolute; left: 100px; top: 100px; z-index:10" />
<div style="width:100%;height:100%;position:absolute;z-index:900;" onclick="alert('hello');"></div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
当点击图像时,没有任何事情发生,而应该触发div元素的click事件(例如在Chrome中工作).
是否有任何解决方法或修复我的问题?