<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>Document</title><style> ???div{ ???????position: relative; ???} ???p{ ???????width: 50px; ???????height: 50px; ???????background: red; ???????opacity: 0.5; ???????position: absolute; ???????z-index: 999; ???????top: 0; ???????left: 0; ???}</style></head><body><h3>外部元素</h3><h3>外部元素</h3><h3>外部元素</h3><div> ???<h3>内部元素</h3> ???<h3>内部元素</h3> ???<h3>内部元素</h3> ???<p></p></div></body></html>
css相对定位不占用空间
原文地址:http://blog.51cto.com/12173069/2113281