我的 Bootstrap 容器如下所示:
<main >
<div class="row co-lg-12 col-md-12 col-xs-12">
<div class="col-lg-1 col-md-1 col-xs-1" style="background-color:red; height: 100vh;"></div>
<div class="col-lg-4 col-md-5 col-xs-0" style="background-color:blue; height: 100vh;">
</div>
<div class="col-lg-1 col-md-0 col-xs-0" style="background-color:green; height: 100vh;"> </div>
<div class="col-lg-3 col-md-4 col-xs-10" style="background-color:yellow; height: 100vh;">
</div>
<div class="col-lg-3 col-md-1 col-xs-1" style="background-color:gray; height: 100vh;"></div>
</div>
</main>
在开发人员工具中检查时,显示蓝色容器占据了屏幕的 100 像素(而不是 0 像素),红色容器在下方..有什么想法吗?
谢谢!
最佳答案
col-xs-0 不存在,如果你想删除它
As such, the classes are named using the format:
.d-{value} for xs .d-{breakpoint}-{value} for sm, md, lg, and xl. Where value is one of:
none inline inline-block block table table-cell table-row flex inline-flex
关于html - 为什么 col-xs-0 占据了 100% 的行宽?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59158973/