這是我的代碼,當頁面有更多的內容,當我們滾動頭移動過,然後我試圖使頭fixed
的位置,但隨後頁腳不會粘底:/如何獲得固定頭與CSS?
html,body
{
margin: 0px;
height:100%;
min-height: 100%;
top: 0;
width: 100%;
position: absolute;
}
header
{
width: 100%;
background-color: #000000;
height: 8%;
min-height: 8%;
}
#container
{
min-height: 85%;
margin-top: 0.5%;
}
footer
{
bottom: 0;
background-color: #000000;
width: 100%;
height: 6%;
min-height: 6%;
position: relative;
}
的OP詢問'固定'**標題**,而不是_footer_。 – Vucko
@PranavRam它不是我想要修復的頁腳我想修復的頁眉 – maniteja