无法向下滚动以查看页脚
Cant scroll down to see footer
本文关键字:滚动 更新时间:2023-09-26
我是一名(荷兰)一年级学生,学习信息通信技术和媒体设计,我们正在使用HTML/CSS/JavaScript。
在为自己创建一个使用javascript、html和css的页面时,我偶然发现了一些问题。
我不能向下滚动以在页面的页脚上看到我的脚。我很确定我在固定位置上做错了什么,但我似乎找不出到底是什么。
希望你们能帮助我,可能有更多的错误定位明智。
提前谢谢你。
http://athena.fhict.nl/users/i299291/WP21/index.html(学校服务器)
您的页脚没有出现,因为您使用了不必要的使用位置。从CSS中删除所有的position:fixed
和position:absolute
,然后页面将可滚动,您可以看到您的页脚。
这是更新后的CSS;你可以看到所有的位置都被注释了,不需要使用它们。
#header {
margin-left: auto;
margin-right: auto;
margin-top: 15px;
position: relative; /* remove this line*/
width: 100%;
}
#menubar {
background-color: #2C2C2D;
border: 1px solid #FFFFFF;
height: 51px;
line-height: 20px;
margin: 261px auto 0; /* remove this line*/
position: absolute; /* remove this line*/
text-align: center;
vertical-align: middle;
width: 1280px;
}
#containerIndex {
background-color: #FFFFFF;
height: 530px;
margin-top: 330px;
opacity: 0.5;
position: fixed; /* remove this line*/
width: 1280px;
}
#footer {
background-color: #C6C7C0;
border: 1px solid #FFFFFF;
height: 48px;
line-height: 50px;
margin: 880px auto 10px;/* remove this line*/
position: fixed;/* remove this line*/
text-align: center;
vertical-align: middle;
width: 1280px;
}
你的页脚有一个固定的位置。它显示在你的内容后面。去掉它,你就可以向下滚动到页脚了。
相关文章:
- 幻灯片滚动javascript不起作用
- 将视口底部滚动到元素底部
- jQuery Lazy加载动画滚动
- 设置滑块分区上的滚动
- 结合jQuery和jetpack无限滚动
- 单击顶部导航时如何进行向下滚动效果(向下滑动).
- 滚动到容器中的下一个元素-几乎到了
- 只覆盖箭头键滚动事件
- Javascript如何找到滚动事件的来源
- Image赢得't隐藏在滚动jQuery上
- Safari(Mac OS)上的jQuery平滑滚动问题
- CSS-若窗口太小,滚动条会出现在“表格”单元格上
- 禁用(而不是隐藏)浏览器滚动条
- JavaScript上下滚动不可预测
- 滚动和表格
- 谷歌地图劫持了iphone's滚动(触摸事件)-如何恢复
- 我希望只有在我滚动页面后才能显示我的返回页首图标
- 循环滚动数组
- 滚动以修复向上滚动的问题
- css停止图像在滚动中移动