如何创建:固定的页脚
学习如何使用 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 定位
学习如何使用 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 定位
CodeW3C.com 提供的内容仅用于培训和测试,不保证内容的正确性。通过使用本站内容随之而来的风险与本站无关。版权所有,保留一切权利。