css - 如何使页脚停留在滚动的末尾
问题描述
我有 html
<head>
</head>
<body>
</body>
<footer>
</footer>
现在我想要的是页脚留在页面的最后,用户应该滚动查看它。你能帮帮我吗?
我试过了 :
footer{
position: fixed;
bottom:-100px;
height: 100px;
left: 0;
width:100%;
text-align: center;
}
但是设置 height:100px 和 bottom:-100px 让它隐藏,而我希望用户能够向下滚动查看它
解决方案
position: fixed; bottom: 0;
为您的页脚添加样式
推荐阅读
- windows - 在四个 3840 x 2160 屏幕上自动打开和定位八个网页 (Windows 10)
- soap - C0000005 ACCESS_VIOLATION 异常与 Progress Openedge 调用 Web 服务时
- python - 通过“文件名”检索 GridFS 文档的文档“_id”
- javascript - 我们如何在打字稿中创建带有前缀/后缀单词的字符串类型?
- excel - 如何在excel中将a+bi表单数据更改为复数?
- mysql - 在远程主机上执行 mysql 查询时转义 mysql 密码中的特殊字符
- forms - 如果未选中复选框(= 请求为空),则不处理 Symfony 表单
- python - 如何获取值具有特定值的行的索引?
- html - 将 img 定位在其父 div 的底部,而不使任何位置成为绝对位置
- amazon-web-services - 为 AWS 成本资源管理器创建 VPC 终端节点