css - 如何使用 bootstrap 将浏览器窗口分成两个画面?

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

我需要按 height:50%; 将窗口拆分为 2 个水平 div; width:100%:,是否可以使用 bootstrap?试过这样:

<div class="container-fluid">
    <div class="row">
        <div class="col-lg-12" style="border:1px solid red">
                1
        </div>
        <div class="col-lg-12" style="border:1px solid red">
                2
        </div>
    </div>
</div>

enter image description here

与绿色相配应该怎样...

最佳答案

只是建议使用 javascript 动态计算 .row div 的高度。 CSS height:50% 仅在父 div 被赋予一定高度时才有效。

EG: .row{ height:500px; 将正常工作。

但是使用 jQuery 函数 $(window).height() 计算这个高度。

关于css - 如何使用 bootstrap 将浏览器窗口分成两个画面?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24933360/

相关文章:

python - 使用 Flask 在同一页面发送和接收数据

javascript - 如何使此字符串替换代码与 `<br/>` 标签一起使用?

javascript - Angularjs 模态在结果发回之前更新我的父范围

javascript - prop() 隐藏我的按钮而不是禁用

jquery - 添加边框时遇到问题

javascript - 问 : PHP Multiple Modal in a button of while loop

javascript - 如何在 twitter bootstrap 模式中将图像拉到左侧?

html - 当网页缩小时使图像堆叠

html - 如何垂直居中并排 anchor 和 anchor 图像标签?

html - CSS 选择器 - 仅使用 [type ="text"] 而不是输入 [type ="text"] 安全吗?