html部分
<div >
    <div >
        <div ></div>
        <div ></div>
    </div>
</div>
<div ></div>

css部分

*{padding: 0;margin: 0;}
html, body, #wrap {height: 100%;}
body > #wrap {height: auto; min-height: 100%;}
#main {padding-bottom: 150px;} /* 必须使用和footer相同的高度 */
#footer {position: relative;margin-top: -150px; /* footer高度的负值 */height: 150px;clear:both;}
.clearfix:after {content: ".";display: block;height: 0;clear: both;visibility: hidden;}
.clearfix {display: inline-block;}

  

 

相关文章:

  • 2021-05-20
  • 2021-06-25
  • 2021-05-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-08
  • 2021-09-15
猜你喜欢
  • 2022-12-23
  • 2021-12-23
  • 2022-12-23
  • 2021-08-29
  • 2021-12-04
  • 2022-12-23
相关资源
相似解决方案