gpt4 book ai didi

html - 限制在页脚上滚动

转载 作者:太空狗 更新时间:2023-10-29 16:42:45 24 4
gpt4 key购买 nike

我有一个 Html 页面,在页脚中创建了一个菜单栏。目前,整个页面是可滚动的。如何限制页脚的滚动。所以,我正在寻找仅在页面内容上滚动。

页脚菜单栏代码如下:

#menu-bar {
height: 50px;
position: fixed;
left: 0px;
bottom: 0px;
width: 100%;
margin: 0px;
padding: 0px;
line-height: 10px;
background: #F07C1F;
z-index: 1000;
}

最佳答案

定位元素,就是你要找的...

http://jsfiddle.net/7fuQm/1/

#menu-bar {
height: 50px;
position: absolute;
left: 0px;
bottom: 0px;
width: 100%;
margin: 0px;
padding: 0px;
line-height: 10px;
background: #F07C1F;
z-index: 1000;
}
#body {
position: absolute;
top:0px;
bottom:50px;
left: 0px;
overflow:auto;
}
p
{
margin: 10px;
}

关于html - 限制在页脚上滚动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13529326/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com