gpt4 book ai didi

html - Bootstrap 网格的问题

转载 作者:太空宇宙 更新时间:2023-11-04 03:19:35 27 4
gpt4 key购买 nike

我的页面在电脑上看起来像这样:

enter image description here

而且我不会在移动尺寸上变成这样:

enter image description here

这有可能解决吗?

最佳答案

参见此处:http://getbootstrap.com/css/#grid-example-mixed

<!-- Stack the columns on mobile by making one full-width and the other half-width -->
<div class="row">
<div class="col-xs-12 col-md-8">.col-xs-12 .col-md-8</div>
<div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
</div>

<!-- Columns start at 50% wide on mobile and bump up to 33.3% wide on desktop -->
<div class="row">
<div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
<div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
<div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
</div>

<!-- Columns are always 50% wide, on mobile and desktop -->
<div class="row">
<div class="col-xs-6">.col-xs-6</div>
<div class="col-xs-6">.col-xs-6</div>
</div>

以上是阅读的地方。

这就是我会做的:我会先制作 2 列,在第一列中我会在彼此的顶部添加两个 div。

我在每个 div 中都使用了 style="" 来向您清楚地显示添加的 CSS

http://jsfiddle.net/Preben/gmvuv8L0/

<div class="row">
<div class="col-xs-6" style="min-height:300px;">
<div style="width:100%;margin-bottom:20px;background:#cecece;min-height:180px;">content</div>
<div style="width:100%;background:#cecece;min-height:100px;">content</div>
</div>
<div class="col-xs-6" style="background:#cecece;min-height:300px;">Column # 2</div>
</div>

enter image description here

enter image description here

关于html - Bootstrap 网格的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28108354/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com