如何使用CSS和HTML对齐文本和图像?左右位置?

问题描述 投票:-1回答:1

如何使用CSS和HTML对齐文本和图像?左右位置。谢谢您的帮助,将不胜感激。enter image description here

这是我想要实现的设计

到目前为止是我的代码

<button type="button" class="not-button btn-long- d-flex pull-right">
    <div class="row">
      <div class="col-4">
        <img src="../../assets/img/video/icon_screen_phone.png" class="video-btn-icon">
      </div>
      <div class="col-4">
        <h5 style="margin-top:10px;margin-left:-10px;">Online</h5>
      </div>
      <div class="col-4">
        <h5 style="float:right;">Plugin Status</h5>
      </div>
    </div>
</button>
html css sass less margin
1个回答
0
投票

您可以使用flexbox,变化无穷。我建议将div的样式设置为喜欢的button。在元素内不要使用css,而不能使用style=""。如果您使用引导程序,请学习它。

最新问题
© www.soinside.com 2019 - 2024. All rights reserved.