twitter-bootstrap Bootstrap 的 3.x 面板,高度为 100%
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18828613/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Bootstrap's 3.x Panel with 100% height
提问by Khrys
Is it possible to css a panel to have 100% height? I tried
是否可以将面板设置为 100% 高度?我试过
html,body{ height:100%}
and than put height: 100%in the panel, without luck.
而不是放在height: 100%面板上,没有运气。
采纳答案by arnistrong
Every parent elements must have height: 100%
每个父元素必须具有高度:100%
回答by Able Alias
panel height depends on the content in the panel body, otherwise you have to set the panel body height manually.
面板高度取决于面板主体中的内容,否则您必须手动设置面板主体高度。
<div class="panel-body" style="height:900px">
回答by ospider
just use height: 100vh;if your browser supports CSS3
只使用height: 100vh;,如果你的浏览器支持CSS3

