我有一段CSS代码,它将底部div
排列在底部0并固定位置。这很有效,但是当我调整窗口大小时,底部div
隐藏了上面的那些(中间和顶部)。
这是代码:
.topFull{
width:100%;
height: 90px;
background:#1b3f61;
position: fixed;
top: 0px;
left: 0px;
}
.middle{
width:100%;
min-width:850px;
max-width:1000px;
height: auto;
margin-top: 120px;
position: absolute;
margin-left: -50px;
}
.bottomFull{
width: 100%;
background:#1b3f61;
height: 180px;
position: fixed;
left: 0;
bottom: 0;
}
答案 0 :(得分:0)
您的.bottomFull
代码已修复且身高180px
。因此,如果您的屏幕较小,它将始终位于其他内容之上。
您可以执行以下操作:
@media only screen and (max-width:500px){
.bottomFull{height:80px;}
}
答案 1 :(得分:0)
我想我解决了。我没有使用bottomFull属性,而是更改了中间div并添加了
padding-bottom: 120px
现在甚至我的bottomFull div总是在窗口的底部我可以滚动并查看中间div的内容。