我有一個頁腳固定在頁面底部並具有設定的高度。是否可以滾動我的頁面的內容,以便它在固定頁腳的頂部結束?防止在固定位置元素後面滾動
我的問題在這裏的小提琴:非固定元素的fiddle
最後250像素(頁腳高度)滾動頁腳後面,當滾動擊中頁面的底部都不見。
<div style="height: 500px; width: 50%; background-color: yellow;"></div>
<div style="height: 500px; width: 50%; background-color: blue;"></div>
<div style="height: 500px; width: 50%; background-color: green;"></div>
<div style="position: fixed; width: 100%; height: 250px; bottom: 0; background-color: #ccc;">
Fixed Footer
</div>
我只是用它作爲我的問題的一個例子,而不是提供外部樣式,感謝幫助 – noclist
@noclist,那太棒了!歡迎 –