2013-03-05 117 views

回答

10

基本上DIV的任何父容器也需要100% - 這包括BODY,HTML等。您可以在'bootstrap.css'之後添加一些CSS來覆蓋Bootstrap CSS,如下所示:

html,body{height:100%;} 

.container { 
    height:100%; 
} 

.fill{ 
    width:100%; 
    height:100%; 
    min-height:100%; 
    background-color:#990000; 
    padding:10px; 
    color:#efefef; 
} 

http://jsfiddle.net/skelly/zrBGw/

+0

斯凱利嗨!非常感謝!有效! – 2013-03-11 12:57:49

+1

在我的情況下(Windows + Chrome)我得到了一個垂直滾動條,因爲填充:10px。使用框大小:邊框;修復了這個問題(我基本上改變了盒子模型)。 – 2014-01-22 16:59:14