css - 放大时,为什么页脚与前面的内容重叠

标签 css xhtml zooming sticky-footer

这是示例 html:

<div id = "mainWrapperDiv">
    <div id = "mainDiv">
        <div> testing </div>
    </div>
 </div>
 <div id = "footerDiv">
 </div>

它的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;
}

最佳答案

您使用的是什么粘性页脚?您的代码是什么样的?你可以试试

http://www.cssstickyfooter.com/

关于css - 放大时,为什么页脚与前面的内容重叠,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4764500/

相关文章:

jquery - 如何避免 Bootstrap 缩略图溢出?

python - PIL 在特定点放大图像

javascript - Fabricjs objectCaching : zoom image content, 保持图像边框

css - 最大高度为 :100% stretches table with manually set height 的图片

javascript - 访问数组中所有元素的第一个元素,由节点列表、JavaScript、DOM 构建

CSS em 与 px(舍入误差)

php - 我如何获取 ?> 和 <?php 之间的内容

javascript - 如何为 css 缩放属性设置动画

python - 从嵌套的 HTML 中提取文本内容,同时排除一些特定的标签;废料

css - 如何使用显示: None in IE 8 Without Losing Image Dimensions