HTML的footer置于页面最底部

vue项目中,使用element-ui的布局,仍然出现footer不固定页面底部的情况,网上找到的一个管用的

方法是:footer高度固定+绝对定位

<html>
<head>
</head>
<body>
<div class="header">header</div>
<div class="main">main content</div>
<div class="footer">footer</div>
</body>
</html>
<style >
.header{background-color: #ffe4c4;}
.main{padding-bottom:100px;background-color: #bdb76b;}/* main的padding-bottom值要等于或大于footer的height值 */
.footer{position:absolute;bottom:0;width:100%;height:100px;background-color: #ffc0cb;}
</style>
 

http://www.cnblogs.com/pinganzi/p/6383487.html

上一篇:HDU 1405


下一篇:html 设置页脚div一直在页面底部