【发布时间】:2021-03-26 00:47:17
【问题描述】:
我尝试通过使用两列并将文本、图标和行定位在左列中并将其他文本定位在右列中来对齐多个项目,但它们没有正确对齐。它目前看起来像this,但它应该看起来像附加的picture。我该如何解决这个问题?
<div class="col-12">
<h1 class="orange">LET'S RUB IT IN</h1>
<h2>How Much?</h2>
</div>
<div class="col-6"> <!--left column-->
<div class="circle side">
<img src="./chemical@2x.png" alt="chemical" class="icon">
</div>
<h5 class="side">1 Shot Glass<br>or 1 oz.</h5>
<div class="line v side"></div> <!--vertical line-->
</div>
<div class="col-6"> <!--right[enter image description here][1] column-->
<p>To fully cover your body, you'll need about 1 ounce of sunscreen or just enough to fill a shot glass.</p>
</div>
【问题讨论】: