放大时,为什么页脚与前面的内容重叠 [英] When zooming in, why does the footer overlap its preceding content
本文介绍了放大时,为什么页脚与前面的内容重叠的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是示例 html:
<div id = "mainDiv"><div>测试
<div id = "footerDiv">
它的CSS:
<代码>*{填充:0px;边距:0px;}正文,html{高度:100%}div{边界:无;}#mainWrapperDiv{最小高度:100%;高度:100%;底边距:-200px;}#mainDiv{边距:0px 自动 0px 自动;宽度:1000px;最小高度:500px;背景:浅绿色;}#footerDiv{高度:200px;宽度:100%;位置:相对;清楚:两者;背景:浅蓝色;}
解决方案
您使用的是什么粘性页脚?你的代码是什么样的?你可以试试
http://www.cssstickyfooter.com/
here is the sample html:
<div id = "mainWrapperDiv">
<div id = "mainDiv">
<div> testing </div>
</div>
</div>
<div id = "footerDiv">
</div>
its css:
*
{
padding: 0px;
margin: 0px;
}
body, html
{
height: 100%
}
div
{
border: none;
}
#mainWrapperDiv
{
min-height: 100%;
height: 100%;
margin-bottom: -200px;
}
#mainDiv
{
margin: 0px auto 0px auto;
width: 1000px;
min-height: 500px;
background: lightgreen;
}
#footerDiv
{
height: 200px;
width: 100%;
position: relative;
clear: both;
background: lightblue;
}
解决方案
What sticky footer are you using? What does your code look like? You could try
http://www.cssstickyfooter.com/
这篇关于放大时,为什么页脚与前面的内容重叠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!