【css】内容不足时底部footer不在最低部解决办法

css部分:

  .continer{

    min-height: 100%;

    padding-bottom: 60px;

  }

  .footer{

    height: 60px;

    margin-top: -60px;

    background-color: #313741;

    color: #fff;

    text-align: center;

    padding: 20px 0;

  }

 

html部分:

<body>

  <div class='continer'>内容</div>

  <div class='footer'>底部</div>

</body>

 

posted @ 2019-03-11 10:29  WANGHUAN-  阅读(865)  评论(0编辑  收藏  举报