gpt4 book ai didi

html - 2 div 在 Bootstrap 中彼此相邻

转载 作者:太空狗 更新时间:2023-10-29 14:40:14 24 4
gpt4 key购买 nike

我正在尝试使用 Bootstrap 显示彼此相邻的两个 div,但它们之间有一定距离。我怎样才能将它们准确地并排放置。

代码:

<div class="col-lg-8 col-lg-offset-2 centered">
<div style="float: left; border: 1px solid; width: 227px; height: 50px;"></div>
<div style="float: right; border: 1px solid;width: 227px; height: 50px;"></div>
</div>

图片说明:

enter image description here

最佳答案

查看grids在 Bootstrap 中。

你可以这样做:

<div class="row">
<div class="col-xs-6">div 1</div>
<div class="col-xs-6">div 2</div>
</div>

关于html - 2 div 在 Bootstrap 中彼此相邻,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23686786/

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