<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.bottom {
background: yellow;
width: 100px;
height: 100px;
}
.top {
pointer-events: none;
width: 100px;
height: 100px;
position: absolute;
top: 0;
left: 0;
}
</style>
</head>
<body>
<!-- 下方div -->
<div class="bottom">
<a href="www.baidu.com">bottom-百度</a>
</div>
<!-- 上方div -->
<div class="top"></div>
</body>
</html>
如果class=‘top’得div不加pointer-events:none 则class=‘bottom’中得div不会被点击