如何做 - 固定頁尾
瞭解如何使用 CSS 建立固定/粘性頁尾。
如何建立一個固定的頁尾
示例
<style>
.footer {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
background-color: red;
color: white;
text-align: center;
}
</style>
<div class="footer">
<p>頁尾</p>
</div>
自己動手試一試 »
提示: 訪問我們的 CSS 定位教程以瞭解更多關於定位的資訊。