0

可能重复:
如何在 HTML 和 CSS 中使用 html 对象编写粘性页脚?

html使用下面的 (LESS) CSS 将 10px 边框应用到对象的顶部和底部。不过,它仅在文档高于视口时才有效。

这就是现在正在发生的事情。如您所见,border-bottom粘在 的底部html,但不粘在窗口的底部。

我已经尝试过填充htmlbody使用height: 100%; height: auto; min-height: 100%;,但它似乎根本不起作用。有什么建议么?

html {
    border-top: solid @black 10px;
    border-bottom: solid @black 10px;
    background: url('img/bg.png') repeat;
}

body {
    width: @8col;
    margin: 0px auto;
    padding: 100px 48px 84px;
    background: @white;
    font: 13px/20px 'OftenRegular';
    color: rgb(60,60,60);
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: @green;
}
4

0 回答 0