定位

<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>定位</title>
<style type="text/css">
.div1{
width: 100px;
height: 100px;
background: #ffff00;
float: left;
}
.div3{
width: 100px;
height: 100px;
background: rebeccapurple;
float: left;
position: relative;css

}
.div2{
width: 100px;
height: 100px;
background: #000080;
/*position: relative;*/
position: absolute;
top:50px;
left: 50px;
float: left;html

}htm


/*body{*/
/*margin: 0;*/
/*padding: 0;*/
/*}*/
</style>it


</head>
<body>io

<div class="div1"></div>
<div class="div2"></div>
<div class="div3"></div>class


</body>
</html>meta

相關文章
相關標籤/搜索