首页 > 其他 > 详细

页面不够长怎么确保底部一直在屏幕最下方

时间:2017-02-10 14:45:48      阅读:283      评论:0      收藏:0      [点我收藏+]

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
html,body {
margin: 0;
padding:0;
height: 100%;
}
#container {
min-height:100%;
height: auto !important;
height: 100%; /*IE6不识别min-height*/
position: relative;
}
#header {
background: #ff0;
padding: 10px;
}


#page {
width: 960px;
margin: 0 auto;
padding-bottom: 60px;/*等于footer的高度*/
}

#footer {
position: absolute;
bottom: 0;
width: 100%;
height: 60px;/*脚部的高度*/
background: #6cf;
clear:both;
}

</style>
</head>
<body>
<div id="container">
<div id="header">Header Section</div>
<div id="page" class="clearfix">


</div>
<div id="footer">Footer Section</div>
</div>
</body>
</html>

  

页面不够长怎么确保底部一直在屏幕最下方

原文:http://www.cnblogs.com/baobaobao/p/6386030.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!