码迷,mamicode.com
首页 > Web开发 > 详细

HTML的footer置于页面最底部

时间:2019-01-26 17:55:54      阅读:1490      评论:0      收藏:0      [点我收藏+]

标签:网上   大于   高度   round   absolute   blog   布局   header   note   

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

HTML的footer置于页面最底部

标签:网上   大于   高度   round   absolute   blog   布局   header   note   

原文地址:https://www.cnblogs.com/wayneliu007/p/10324279.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!