1. 程式人生 > >【css】內容不足時底部footer不在最低部解決辦法

【css】內容不足時底部footer不在最低部解決辦法

text tex bsp margin 底部 adding add 20px con

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>

【css】內容不足時底部footer不在最低部解決辦法