frontEnd-fucker / ideas

ideas and todos
0 stars 0 forks source link

Sticky Footer,完美的绝对底部 #9

Open frontEnd-fucker opened 7 years ago

frontEnd-fucker commented 7 years ago
<div class="wrapper">
    <div class="content"><!-- 页面主体内容区域 --></div>
    <div class="footer"><!-- 需要做到 Sticky Footer 效果的页脚 --></div>
</div>
html, body {
    height: 100%;
}
.wrapper {
    position: relative;
    min-height: 100%;
    padding-bottom: 50px;
    box-sizing: border-box;
}
.footer {
    position: absolute;
    bottom: 0;
    height: 50px;
}