position
<!DOCTYPE HTML>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>定位</title>
<style type="text/css">
div{
background-color: #0fc;
border:1px solid #000
}
h1{
text-align: center;
color: pink;
font-size: 12;
}
.divcss1{
position:absolute;
width:800px;
height:100px;
position: relative;
}
.divcss2{
position:relative;
width:200px;
height:300px;
top: 100px;
background:#0fc;
}
.divcss3{
width: 400px;
height: 100px;
left: 200px;
top: 100px;
position: absolute;
background: yellow;
}
.divcss4{
width: 400px;
height: 100px;
left: 200px;
top: 200px;
position: absolute;
background: gray;
}
.divcss5{
width: 400px;
height: 100px;
left: 200px;
top: 300px;
position: absolute;
background: yellow;
}
.divcss6{
width: 200px;
height: 300px;
left: 600px;
top: 100px;
position: absolute;
}
</style>
</head>
<body>
<h1>Relative和Absolute组合使用</h1><br>
<div class="divcss1">
<div class="divcss2"></div>
<div class="divcss3"></div>
<div class="divcss4"></div>
<div class="divcss5"></div>
<div class="divcss6"></div>
</div>
</body>
</html>