我檢查并嘗試了一些解決這個著名問題的方法,但我仍然無法使其正常作業。我的頁腳實際上位于頁面底部,但是當我需要滾動時,它不會停留在底部(它位于螢屏底部,但一旦我開始滾動,它就會停留在螢屏中間而不是停留在底部)
.footer {
background-color: rgb(10, 4, 22);
bottom: 0 !important;
position: absolute;
padding-top: 10px !important;
padding-bottom: 8px !important;
}
我究竟做錯了什么 ?
uj5u.com熱心網友回復:
absolute與內容系結,如果您需要將元素系結到視窗,則需要position: fixed
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/442043.html
