当父级属性position是absolute,子节点也是absolute的时候,子节点是相对父级absolute的,举个例子
<div class="headManage">
<a href="javascript:;" class="guanli">
<div class="bg"></div>
<span class="index_bg">管理照片</span>
</a>
</div>
.headManage{position: relative;}
.guanli{position: absolute;top:116px;left:0;}
.guanli .bg{position: absolute;top:116px;left:0;}
.guanli .index_bg{position: absolute;top:116px;left:0;}
![](https://i-blog.csdnimg.cn/blog_migrate/bc9335253aaf59243752bdf79d28e449.jpeg)
正确应该是:
<div class="headManage">
<a href="javascript:;" class="guanli">
<div class="bg"></div>
<span class="index_bg">管理照片</span>
</a>
</div>
.headManage{position: relative;}
.guanli{position: absolute;top:116px;left:0;}
.guanli .bg{position: absolute;top:0;left:0;}
.guanli .index_bg{position: absolute;top:0;left:0;}
![](https://i-blog.csdnimg.cn/blog_migrate/a72c10645336d5bd2471b587169a9e28.jpeg)