HTML页脚设置
#container {min-height:100vh;height: auto !important;position: relative;padding-bottom: 180px;}#header {background: #ff0;padding: 10px;...
#container {
min-height:100vh;
height: auto !important;
position: relative;
padding-bottom: 180px;
}
#header {
background: #ff0;
padding: 10px;
}
#page {
width: 960px;
height:1000px;
margin: 0 auto;
padding-bottom: 60px;/*等于footer的高度*/
}
#footer {
position: absolute;
bottom: 0;
width: 100%;
height: 60px;/*脚部的高度*/
background: #6cf;
clear:both;
}
<div id="container">
<div id="header">Header Section</div>
<div id="page" class="clearfix">
<div id="left">Left Sidebar</div>
<div id="content">Main content</div>
<div id="right">Right sidebar</div>
</div>
<div id="footer">Footer Section</div>
</div>
更多推荐
所有评论(0)