Can someone explain to me why BS has a 1px height set by default? IT was this way in 2 and 3 and I never understood why? I know it says in the comments "Prevent columns from collapsing when empty" but what browsers does it do this?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Try and you will know: http://bootply.com/82722
<div class="container" style="background-color:orange;">
<div class="row">
<div class="col-sm-6" style="background-color:blue;"></div>
<div class="col-sm-6" style="background-color:red;">right</div>
</div>
</div>
<div class="container" style="background-color:orange;">
<div class="row">
<div class="col-sm-6" style="background-color:blue;min-height:0"></div>
<div class="col-sm-6" style="background-color:red;">right</div>
</div>
</div>
回答2:
// Prevent columns from collapsing when empty
min-height: 1px;
Source: http://getbootstrap.com/css/#grid