Html 三柱布局,最小高度100%
如何创建具有Html 三柱布局,最小高度100%,html,css,twitter-bootstrap,twitter-bootstrap-3,Html,Css,Twitter Bootstrap,Twitter Bootstrap 3,如何创建具有最小100%高度的三列布局,将滚动页面 <div class="container"> <div class="row"> <div class="col-sm-4"></div> <div class="col-sm-4"></div> <div class="col-sm-4"></div> </div> </div
最小100%高度的三列布局
,将滚动页面
<div class="container">
<div class="row">
<div class="col-sm-4"></div>
<div class="col-sm-4"></div>
<div class="col-sm-4"></div>
</div>
</div>
我不知道如何将的最小高度设置为100%
并使用滚动页面
如果您的100%高度容器位于文档体内部,请确保您的文档体和html元素也跨越100%高度
您的css应该有如下内容:
html, body {
height: 100%;
}
html,body {height:100%;margin:0;background:#eee}
.container {height:100%}
.row {overflow:auto;height:100%;}
.col-sm-4 {height:100%;float:left;background:white;margin:0 1%;width:31.3333%}
如果您的100%高度容器位于文档体内部,请确保您的文档体和html元素也跨越100%高度
您的css应该有如下内容:
html, body {
height: 100%;
}
html,body {height:100%;margin:0;background:#eee}
.container {height:100%}
.row {overflow:auto;height:100%;}
.col-sm-4 {height:100%;float:left;background:white;margin:0 1%;width:31.3333%}
基本上,使用表布局显示属性很好:
html, body, .container {
height:100%;
width:100%;
margin:0;
background:lightgray
}
.container {
display:table;
border-spacing:0.5em;
}
.row {
display:table-row;
}
.col-sm-4 {
display:table-cell;
background:white;
}
基本上,使用表布局显示属性很好:
html, body, .container {
height:100%;
width:100%;
margin:0;
background:lightgray
}
.container {
display:table;
border-spacing:0.5em;
}
.row {
display:table-row;
}
.col-sm-4 {
display:table-cell;
background:white;
}
大概是这样的:
html, body {
height: 100%;
}
html,body {height:100%;margin:0;background:#eee}
.container {height:100%}
.row {overflow:auto;height:100%;}
.col-sm-4 {height:100%;float:left;background:white;margin:0 1%;width:31.3333%}
类似这样的内容:
html, body {
height: 100%;
}
html,body {height:100%;margin:0;background:#eee}
.container {height:100%}
.row {overflow:auto;height:100%;}
.col-sm-4 {height:100%;float:left;background:white;margin:0 1%;width:31.3333%}
什么是“滚动页面”?你能将代码放入JSFIDLE并共享吗?什么是“滚动页面”?你能将代码放入JSFIDLE并共享吗?