让图片铺满,并且可以滚动
<!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>页面高度100%</title>
<style>
*{
margin: 0px;
padding: 0px;
}
/* 给高度 100% 能让图片铺满 并且可以滚动 */
html,body {
height: 100%;
}
.top {
height: 10%;
}
.wrapper {
background: url(img/spring2017.jpg) center no-repeat;
/* background-color: #0000ff; */
/* width: 100%; */
height: 100%;
min-height: 500px;
min-width: 900px;
}
.bottom {
height: 10%;
}
</style>
</head>
<body>
<div class="top">-----</div>
<div class="wrapper">
wrapper
</div>
<div class="footer">-------</div>
</body>
</html>