Bootstrap容器或填充高度100%浏览器

时间:2014-12-26 12:39:32

标签: html css twitter-bootstrap twitter-bootstrap-3 height

我需要将高度容器设置为100%浏览器,但是当你放置标签的内容时会破坏容器。



html, body {
  height: 100%;
  min-height: 100%;
}
.container {        
  min-height: 100%;
  height: 100%; 
  background-color:red; 
}

<div class="container">
    <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> 
        <img class="img-responsive" src="http://placehold.it/1920x1080 " alt="" />
        <img class="img-responsive" src="http://placehold.it/1920x1080 " alt="" />
    </div>
</div>
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:0)

使用vh获得全高。 100vh = 100%。 现在,使用container-fluid获取bootstrap 3上的全宽

相关问题