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

相关文章:

  • 2021-12-29
  • 2022-12-23
  • 2022-01-16
  • 2022-12-23
  • 2022-03-02
  • 2022-02-01
  • 2021-09-21
猜你喜欢
  • 2021-09-11
  • 2021-09-05
  • 2021-06-20
  • 2021-09-28
  • 2022-01-17
相关资源
相似解决方案