当我尝试将两个 div 并排放置时,"col-md-6" 不起作用
"col-md-6" is not working when i am trying to place two div's next to each other
我试图通过 bootstrap 类 将文本部分和图像并排放置,但无法做到。请帮忙。
<div class="container">
<div class="row">
<div class="home-shape">
<div class="col-md-6">
<h1>Find Your Perfect Future Home</h1>
<p>Search confidentially with your trusted source of homes for sale or rent</p>
</div>
<div class="col-md-6 home-image-banner">
<img src="images/building.png" alt="">
</div>
</div>
</div>
</div>
您的 col-md-6
需要是 row
的直系子代。如果您需要 home-shape
class,请将代码更改为:<div class="row home-shape">
,而不是单独的 divs
.
我试图通过 bootstrap 类 将文本部分和图像并排放置,但无法做到。请帮忙。
<div class="container">
<div class="row">
<div class="home-shape">
<div class="col-md-6">
<h1>Find Your Perfect Future Home</h1>
<p>Search confidentially with your trusted source of homes for sale or rent</p>
</div>
<div class="col-md-6 home-image-banner">
<img src="images/building.png" alt="">
</div>
</div>
</div>
</div>
您的 col-md-6
需要是 row
的直系子代。如果您需要 home-shape
class,请将代码更改为:<div class="row home-shape">
,而不是单独的 divs
.