初始包含块
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
*{
margin: 0;
padding: 0;
}
html{
height: 100%;
overflow: hidden;
}
body{
height: 100%;
overflow: hidden;
}
#wrap{
height: 100%;
border: 1px solid deeppink;
overflow: auto;
}
#pink{
position: absolute;
left: 0;
top: 0;
width: 200px;
height: 200px;
background: pink;
}
</style>
</head>
<body>
<!--初始包含块:是一个视窗大小的矩形!! 这里的id=wrap是初始包含块-->
<div id="wrap">
<div id="pink">
</div>
<div id="test" style="height: 3000px;">
</div>
</div>
</body>
</html>