【问题标题】:Have main content background color expend all the way down to footer at bottom of browser让主要内容背景颜色一直延伸到浏览器底部的页脚
【发布时间】:2012-06-30 06:46:35
【问题描述】:

这是我当前的 HTML 和 CSS http://jsfiddle.net/fqu6U/

我希望红色一直到页脚。

【问题讨论】:

    标签: html css background sticky-footer


    【解决方案1】:

    查看http://jsfiddle.net/fqu6U/3/

    干扰的问题:浮动,高度:自动。

    【讨论】:

    • 我只在 IE8 中看到一个大红色块(没有页脚)
    【解决方案2】:

    为什么不把它添加到 CSS 的底部:

    body
    {
        background-color:red
    }
    

    编辑:鉴于您的评论,您可能想看看这个:http://www.cssstickyfooter.com/using-sticky-footer-code.html

    【讨论】:

    • 因为我需要顶部是透明的,只有内容是红色的。不是全身bg
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-05-14
    • 2017-07-01
    • 1970-01-01
    • 2020-11-15
    • 2013-03-25
    • 2017-08-01
    • 1970-01-01
    相关资源
    最近更新 更多