html - 如何使页脚留在页面底部引导程序 4
问题描述
这个问题可能会重复!我希望我的页脚位于页面底部,但在滚动时不会固定在那里。我希望它像本页底部的页脚 Footer Example一样。到目前为止,这是我的页脚代码,我一直在使用 bootstrap 4,但我找不到一个类来帮助我完成我想要的。
<footer>
<a href="#"><i class="fa fa-facebook"></i></a>
<a href="#"><i class="fa fa-twitter"></i></a>
<a href="#"><i class="fa fa-google-plus"></i></a>
<a href="#"><i class="fa fa-twitch"></i></a>
</footer>
我很清楚引导类
.fixed-bottom
但就像我说的,我不希望页脚在滚动时留下。
解决方案
您可以使用纯 CSS,如下所示:
footer {
position: absolute;
bottom: 0;
width: 100%;
background-color: #333;
color:#fff;
}
推荐阅读
- php - php codeigniter网站显示未连接到safari ios手机中的服务器
- c++ - C++ 中的字符串是否没有超出范围的异常/错误?
- python - 正则表达式:直到但不包括组或组
- excel - VBA display XML with hierarchy in cells
- excel - VBA SUB 没有对象集
- reactjs - 如何使用城市名称而不是 lat 并登录 OpenWeather API?
- javascript - 取消选中复选框usestate react hooks时如何从数组中删除项目
- r - 如何在R中为每个组建立一个逆序唯一索引
- jquery - 通过 ajax 发布表单数据和文件
- mongodb - MongoDB BSON - 搜索特定字段