题解 | #定位 - absolute#
定位 - absolute
http://www.nowcoder.com/practice/4a7cd2e295604c5ca30380b61506208b
<html>
<head>
<meta charset=utf-8>
<style type="text/css">
* {
margin: 0;
padding: 0;
padding-left:10px;
}
.outer {
width: 100px;
height: 100px;
background-color:pink;
}
.middle {
width: 100px;
height: 100px;
background-color:yellow;
position:absolute;
}
.inner {
width: 100px;
height: 100px;
background-color:lightblue;
position:absolute;
left:0px;
}
</style>
</head>
<body>
<div class="outer">
<div class="middle">
<div class="inner">
</div>
</div>
</div>
</body>
</html>