<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">

<title>Document</title>

<style>
.left {
width: 200px;
height: 100%;
background-color: yellow;
overflow:auto;
position: relative; /* 外面必须是非static定位,不是absolute相对于body */
}
.right {
flex-grow: 1;
height: 100%;
background-color: darkseagreen;
}

.update {
position: absolute; /* 绝对定位 */
right: 20px;
bottom: 20px;
}
.neibuDiv{
width:100%;
height:100%;//关键
overflow: auto;//关键
background-color: aqua;
}
.neibuDiv li{
height:50px;
}
</style>
</head>
<body style="margin:0px;">

<div style="width: 100%; height: 100%;display:flex;position:absolute;">
<div class="left">
<div class='neibuDiv'>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
</div>
<div class="update">

<a href="#">修改</a>
</div>
</div>
<div class="right">

</div>
</div>


</body>
</html>

posted on 2017-10-16 09:27  大头小明  阅读(196)  评论(0编辑  收藏  举报