bootstrap-4 - 如何使用引导程序将页面水平分成两个相等的部分
问题描述
我在一页中创建两个表单。所以我需要使用 bootstrap4 将页面水平分成两半。任何人请帮我这样做
我试过这个,但不工作
page.html
<div class="container">
<div class="row">row1
</div>
<div class="row">row2
</div>
</div>
页面.css
.row{
height:50%;
}
.container{
height: 100%;
}
解决方案
试试这个 CSS
html {
height: 100%;
width: 100%;
}
body {
display: table;
height: 100%;
margin: 0;
padding: 0;
width: 100%;
}
.row {
display: table-row;
height: 50%;
}
推荐阅读
- python - AttributeError:模块“base64”没有属性“b64decode”
- tensorflow - 根据图形时间未知的大小拆分张量
- javascript - async/await 嵌套是否会对性能产生影响?
- c# - 如何将 C# 8 中的默认返回值标记为仅对类可以为空?
- jenkins - Jenkins 多分支:错误 MC1000:未知构建错误
- apache-kafka - 检测 Kafka Streams 2.0 中的废弃进程
- css - 在移动设备上调整徽标大小
- matrix - SSRS 静态字段分组
- mysql - 如何选择一个值然后更新一个字段
- xml - 识别/解析 CSV 文件中要在 XSLT 样式表中使用的非常特定的单元格