1
navbar-static-top
navbar-fixed-top
とnavbar-fixed-bottom
ですが、navbar-static-bottom
はブートストラップでは機能しません。この効果を達成する方法はありますか?navbar-static-bottomクラスの達成方法は?
navbar-static-top
navbar-fixed-top
とnavbar-fixed-bottom
ですが、navbar-static-bottom
はブートストラップでは機能しません。この効果を達成する方法はありますか?navbar-static-bottomクラスの達成方法は?
この
HTML
<html>
<body>
<div class="wrapper">
<div class="contents">
<div class="clearfix">
<!-- some contents -->
</div>
</div>
<footer>
<div class="clearfix">
<!-- some contents -->
</div>
</footer>
</div>
</body>
</html>
CSS
html, body {
background-color: #F3F3F3;
height: 100%;
margin: 0;
padding: 0;
}
.wrapper {
position: relative;
min-height: 100%;
}
.contents {
height: 1500px;
}
footer {
background-color: rgb(34, 42, 53);
position: absolute;
bottom: 0; /* absolutely bottom */
width: 100%;
}
.clearfix {
padding: 20px;
}
フッターがスティックかどうかを確認するためにフッターを見て、 '.contents'の高さを変更します。 – keziah
あなたはスティッキーフッターバーの後にありますか?試してみてください – Harvey
はい、私はそう信じています。 – HomeBrainBox
http://getbootstrap.com/examples/sticky-footer/ – thepio