加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

twitter-bootstrap – 如何在bootstrap网格中设置顶行的高度?

发布时间:2020-12-18 00:21:54 所属栏目:安全 来源:网络整理
导读:我有一个容器,我想使用引导网格分成两个水平行. 顶行应占高度的80%,其余部分占底部. div class="container-fluid" div class="row" style="height:80%" div class="col-xs-12"This should take up 80% of the height/div /div div class="row" div class="c
我有一个容器,我想使用引导网格分成两个水平行.

顶行应占高度的80%,其余部分占底部.

<div class="container-fluid">
    <div class="row" style="height:80%">
        <div class="col-xs-12">This should take up 80% of the height</div>
    </div>

    <div class="row">
        <div class="col-xs-12">This should take up the remaining 20% of the height</div>
    </div>
</div>

我尝试将高度:80%作为内联样式添加到第一行,但它没有任何效果.

我在这里想念的是什么?

解决方法

body,html,.container-fluid {
     height: 100%;
}

一个例子:
http://jsfiddle.net/wqkLodb6/

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读