我在Angular 2中構建項目,我需要一個粘性頁腳,它總是必須位於頁面底部,而不是固定的。例如:http://codepen.io/chriscoyier/pen/uwJjrAngular 2中底部粘性頁腳
「應用」成分的結構是這樣的:
<header-main></header-main>
<router-outlet></router-outlet>
<footer>...</footer>
也許,問題不與角本身連接,但只有CSS。不過,我試圖實現這樣的:
app {
min-height: 100%;
position: relative;
}
footer {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 271px;
}
有趣的是,如果我關掉在檢查員頁腳的位置,然後重新打開,頁腳變成OK:
SOLUTION:
app {
min-height: 100%;
width: 100%;
margin-bottom: -271px;
display: table;
}
header-main,
router-outlet,
footer{
display: table-row;
}
header-main {
height: 60px;
}
router-outlet {
position: absolute;
}
footer {
height: 271px;
}
有這方面的任何soluting?我面臨同樣的問題 –
的任何迴應。我需要幫助烏爾感謝 –
你這麼多張貼SOLUTION <3 <3 – Cacoon