固定页脚

创建于 2024-12-03 / 43
字体: [默认] [大] [更大]

了解如何使用 CSS 创建固定/粘性页脚。


亲自试一试 »


如何创建固定页脚

实例

<style>
.footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  background-color: red;
  color: white;
  text-align: center;
}
</style>

<div class="footer">
  <p>Footer</p>
</div> 亲自试一试 »

提示: 转到我们的 CSS 定位教程,了解有关定位的更多信息。



0 人点赞过