我想讓頁腳成爲我的網站,並且我希望它被修復(總是在botton中)。 它工作並且看起來不錯,但是當內容已滿時,它不顯示我給它的邊距。請幫助,我需要一種方法來給固定的div - 保證金頂... 謝謝。如何使固定div和保證金?
代碼:
<div style="width: 100%; height: 100px; margin-bottom: 50px; background: red;">
</div>
<div style="width: 100%; text-align: center;">
Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />Example of full div<br />
</div>
<div style="width: 100%; height: 50px; margin-top: 50px; background: blue; position: fixed; bottom: 0;">
</div>
順便說一句,內聯的CSS通常不是最好的主意,它很難隨時保持。 – dezman