<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
div{
width: 300px;
height: 300px;
background: pink;
/*设置相对定位*/
/*相对定位的特点:
1.以自己之前的位置作为参照物进行定位
2.在进行移动的时候会把原来的位置继续占着
* */
position: relative;
left: 100px;
top: 100px;
}
</style>
</head>
<body>
<p>匹配匹配铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺</p>
<p>匹配匹配铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺</p>
<div></div>
<p>匹配匹配铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺</p>
<p>匹配匹配铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺</p>
<p>匹配匹配铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺</p>
<p>匹配匹配铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺</p>
</body>
</html>
<!--
定位:父相子绝
相对定位
绝对定位
-->