css CSS:使div为浏览器窗口的100%高度

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了css CSS:使div为浏览器窗口的100%高度相关的知识,希望对你有一定的参考价值。

html, body {
    height: 100%; /* IMPORTANT!!! stretches viewport to 100% */
}

#wrapper {
    min-height: 100%; /* min. height for modern browser */
    height:auto !important; /* important rule for modern Browser */
    height:100%; /* min. height for IE */
    overflow: hidden !important; /* FF scroll-bar */
}

/* From http://stackoverflow.com/questions/1575141/make-div-100-height-of-browser-window */

以上是关于css CSS:使div为浏览器窗口的100%高度的主要内容,如果未能解决你的问题,请参考以下文章