纯css 实现footer sticker

希望footer一直在页面底部

css

html, body, #sticker {height: 100%;}
    body > #sticker {height: auto; min-height: 100%;}
    #stickerCon {padding-bottom: 40px;} 
    #footer {margin-top:-40px; height: 40px; width: 100%; text-align: center; line-height: 40px; color: #ABA498; font-size: 12px; background: #fafafa; border-top:1px solid #E7E7E7;}

html

<div id="sticker">
    <div id="stickerCon"></div>
</div>
<div id="footer">footer</div>
    原文作者:小渝人儿
    原文地址: https://segmentfault.com/a/1190000000351667
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞