基线上的页脚

时间:2013-02-07 19:51:03

标签: css css3 zurb-foundation

我无法弄清楚为什么页脚上的黑条不会出现在窗口的基线上。 滚动时我不希望它“固定”。就在绝对的底部

html { 
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    position: relative;
}

body {
    padding-top: 15px; /* 60px to make the container go all the way to the bottom of the topbar */
    background: #f7f7f7 repeat-x url(<%=image_path('background.png')%>) top left;
    font-family: Helvetica, Arial, sans-serif;
    color: #323232;
}

footer{
    margin: 0px;
    padding: 10px;
    background: black;
    color: white;
    position: absolute;
    left:0;
    right: 0;
    bottom: 0;

}

enter image description here

1 个答案:

答案 0 :(得分:1)

这个常见问题有一个very solid solution,当我希望页脚“粘”时,我总是使用它。