我無法弄清楚如何讓頁腳粘到底部。如果內容小於尺寸頁腳應該在底部&如果內容大於窗口大小,頁腳應該在內容的結尾。我知道互聯網上有大量的材料,如何將腳註粘到底部。下面的代碼工作正常時,內容大:頁腳應該在頁面底部/內容
這裏是我的HTML:
<html>
<body ng-cloak>
<notifications-bar class="notifications"></notifications-bar>
<div ng-controller="MainCtrl as main">
<ng-include src="'app/layout/header.html'"></ng-include>
<div ng-view></div>
<ng-include src="'app/layout/footer.html'"></ng-include>
</div>
<spinner></spinner>
</body>
</html>
這裏是CSS:
* {
margin: 0;
}
html { position: relative; min-height:100%;
}
html, body { margin:0px; padding:0px;
}
.footer_body {
background-color: rgb(102, 102, 102);
margin:0px;
position: relative;
top: 0px;
bottom: 0px;
width: 100%;
}
爲了讓您的頁腳固定在底部,位置:固定;底部:0; –