【问题标题】:How to align text with ICON using CSS如何使用 CSS 将文本与 ICON 对齐
【发布时间】:2021-11-30 12:13:56
【问题描述】:

我想将第二行文本与第一行文本对齐。 这是我网站的网址:https://stgbusiness.wpengine.com/

这是代码:

<img src="https://stgbusiness.wpengine.com/wp-content/uploads/2021/10/modules-icon.png" /><span class="m-icons">Contracts, Business Valuation and Pricing Negotiations</span>

有没有办法让这个文本对齐?

【问题讨论】:

标签: javascript html css wordpress themes


【解决方案1】:

我认为你可以使用 flexbox 并这样做:

.note {
display: flex;
align-items: center;
}
<div class="note">
<img src="https://stgbusiness.wpengine.com/wp-content/uploads/2021/10/modules-icon.png" />
<span>
Learn from the best in the business. Our Broker advisory board has a combined 150 years worth of business brokering experience
</span>
</div>

【讨论】:

  • 它从图标检查图像中分离出来i.imgur.com/L9nVDnQ.jpg
  • 你添加了 CSS 吗?
  • 是的,我已经添加了css
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-08-19
  • 2010-11-02
  • 2016-06-19
  • 2015-06-10
  • 2023-03-14
  • 1970-01-01
相关资源
最近更新 更多