<!DOCTYPE html>
<html>
<head>
	<title></title>
	<style type="text/css">
	*{
		margin: 0;padding: 0
	}
	body{
		 /*overflow:hidden;*/
	}
	#container{
        margin-top: 50px;
	}
	#header{
		height: 50px;
		width: 100%;
		background-color:red;
		position: fixed;
		color: blue;
		top: 0;
		text-align: center;
	}
	#footer{
		height: 50px;
		width: 100%;
		background-color:gray;
		position: fixed;
		bottom: 0;
		color: blue;
		text-align: center;
	}
	#content{
		height: 820px;/*这个高度设置是关键*/
		overflow-y:scroll;/*显示滚动条*/
	}
	</style>
</head>
<body>
<div >
	<div >
		header
	</div>
	<div >
		<p>headerheaderheaderheaderheaderheaderheader</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>11111</p>
		<p>footerfooterfooterfooterfooter</p>
	</div>
	<div >
		footer
	</div>
</div>
</body>
</html>

  

相关文章:

  • 2022-12-23
  • 2021-06-13
  • 2021-12-27
  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
  • 2021-11-07
  • 2022-12-23
猜你喜欢
  • 2021-12-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案