0

十分なコンテンツがない場合に、フッターを一番下に表示するにはどうすればよいでしょうか。

これをcssに使用するとposition:absolute; bottom:0;

問題は、コンテンツが多すぎると、フッターが浮いてコンテンツをオーバーレイすることです。

http://niceguy.co/

ありがとう。

4

3 に答える 3

1

http://www.cssstickyfooter.com/が探しているものです。

于 2013-07-09T03:35:27.040 に答える
0

定義する必要がありますposition: fixed; bottom: 0; width: 100%;

于 2013-07-09T02:24:28.863 に答える
0

構造は次のようにする必要があります。

<body>
    <section id="wrap><!-- This has header, etc --></section>
    <footer></footer>
</body>

次にCSS(50pxはフッターの高さです。それを置き換えてください):

html, body { height: 100%; }
#wrap {
     min-height: 100%;
     padding-bottom: 50px;
}
footer {
    height: 50px;
    margin-top: -50px;
}
于 2013-07-09T02:43:45.777 に答える