为什么将positioning由relative改为absolute,span标签的文字就往上移动呢?我还是不怎么理解什么时候用absolute,什么时候用rel
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>absolute样式</title>
<style type="text/css">
#on{
width: 600px;
height: 600px;
border: 2px solid red;
position: absolute;
left: 400px;
top:10px;
}
.div2{
width: 300px;
height: 300px;
position: absolute;
left: 60px;
border: 2px solid red;
}
</style>
</head>
<body>
<body>
<div id="on">
<div class="div2"></div><span>偏移前的位置还保留不动,覆盖不了前面的div没有偏移前的位置</span>
</div>
</body>
</body>
</html>