0

我在 IE 上检查了我的 Tumblr 主题,页脚位于页面中间,这是我的代码。

#mastfooter {
    background-color: #4F3117;
    height: 295px;
    clear: both;
    margin-top: 0;
    margin-right: auto;
    margin-bottom: auto;
    margin-left: auto;
    width: 100%;
    position: absolute;
    left: 0px;
    bottom: -38px;
}

是否有 Internet Explorer 9 解决方案?

4

2 回答 2

0

根据提供的代码,我猜您需要将其更改为类似这样-

#mastfooter {
background-color: #4F3117;
height: 295px;
clear: both;
margin-right: auto;
margin-left: auto;
width: 100%;
position: fixed; /* keeps the footer visible even when scrolling*/
bottom: 0px; 

}

请注意,顶部和底部边距已被删除,它们很可能是定位问题的原因。

于 2013-04-04T15:52:50.693 回答
0

Ryan Fait 拥有针对粘页脚的最佳跨浏览器解决方案

看这里

但是在 stackoverflow 上有无数只使用 CSS 的粘性页脚示例。

于 2013-04-04T15:37:49.990 回答