我试图用5个DIV制作页面。
计划是把在中央DIV一个图像,并在每个其他4的链接,使用自举3.等于div和100%身高的自举
求购结果:
代码到目前为止:
.container-fluid2 {
min-height: 100%;
overflow: hidden;
background-color: black;
}
.levogore5 {
height: 50%;
min-height: 50%;
margin-bottom: -22%;
padding-bottom: 22%;
min-width: 25%;
max-width: 100%;
background-color: lime;
vertical-align: top;
}
.levodole5 {
height: 50%;
min-height: 50%;
margin-bottom: -25%;
padding-bottom: 25%;
min-width: 25%;
max-width: 100%;
background-color: green;
vertical-align: baseline;
margin-top: 22%;
}
.centar5 {
height: 100%;
min-height: 100%;
min-width: 50%;
max-width: 100%;
background-color: red;
margin-bottom: -50%;
padding-bottom: 50%;
overflow: hidden;
}
.desnogore5 {
height: 50%;
min-height: 50%;
margin-bottom: -22%;
padding-bottom: 22%;
min-width: 25%;
max-width: 100%;
background-color: aqua;
vertical-align: top;
}
.desnodole5 {
height: 50%;
min-height: 50%;
margin-bottom: -25%;
padding-bottom: 25%;
min-width: 25%;
max-width: 100%;
background-color: blue;
vertical-align: baseline;
float: right;
margin-top: 22%;
}
<div class="container-fluid2">
<div class="row">
<div class="col-sm-3 levogore5">levo gore</div>
<div class="col-sm-5 col-sm-5 span2 centar5">centralni</div>
<div class="col-sm-3 desnogore5">desno gore</div>
</div>
<div class="row">
<div class="col-sm-3 levodole5">levo dole</div>
<div class="col-sm-3 desnodole5">desno dole</div>
</div>
</div>
我想我读了所有现有的q问题和答案在这里。
我试过html/body 100%
,max-height
,container-fluid
,-9999px
,但他们没有工作。
我忘了提及,响应是至关重要的,在我的例子中,那些float:right(在最后DIV的css中)在小屏幕上变得非常大。
我的想法是使用引导到具有较小的屏幕少的问题,更简单的页面引导才使水平的DIV,所以我希望桩有这样的事情
会发生什么情况?请使用您的HTML,CSS和您正在使用的其他任何东西发布JSFiddle的链接(如JavaScript) –
让我知道我的答案是否有效。如果是,请勾选绿色标记以表明其正确性。 –
这应该这样做:http://stackoverflow.com/questions/16390370/how-can-i-get-a-bootstrap-column-to-span-multiple-rows –