0
我抄代碼,所以我沒有太多的想法回合後援設計似乎工作在桌面瀏覽器不錯,但只要我用手機配置頁腳似乎重疊的內容重疊的內容。 。固定導航欄在小型設備
<div class="navbar navbar-inverse navbar-fixed-bottom container">
<div class="row">
<div>
<p class="navbar-text" align="center">©
<script type="text/javascript">
document.write(new Date().getFullYear());
</script>
mywebsite.com
</p>
</div>
</div>
</div>
這裏是CSS
body {
/* Margin bottom by footer height */
margin-bottom: 60px;
}
body { padding-top: 15px;}
@media screen and (max-width: 768px) {
body { padding-top: 0px; }
body { padding-bottom: 60px; }
}
這裏是頁腳類..
.footer {
position: absolute;
bottom: 0;
width: 100%;
/* Set the fixed height of the footer here */
height: 40px;
background-color: #f5f5f5;
position: relative;
}
分享你的鏈接 –