在ie浏览器 文档模式为7进行测试效果哦
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
body{
position: relative;
}
.aaa{
font-size:14px;
position: absolute;
left:0;
top:0;
}
.ccc{
position: absolute;
left:0;
top:10px;
border:1px solid red;
display: none;
width:100px;
height:50px;
background-color: #fff;
z-index: 999;
}
.aaa:hover + .ccc{
display: block;
}
.bbb{
position: absolute;
left:0;
top:20px;
}
</style>
</head>
<body>
<div style="position: relative;z-index:2">
<span class="aaa">鼠标滑到我身上看效果</span>
<div class="ccc">上方内容</div>
</div>
<div style="position: relative;z-index: 1">
<div class="bbb">下方内容</div>
</div>
</body>
</html>
需要在父元素加z-index,底部的父元素z-index小,位于上边的父元素z-index大点