【问题标题】:How can I align image horizontally in tailwind-css in Laravel breeze如何在 Laravel 微风中的 tailwind-css 中水平对齐图像
【发布时间】:2022-01-11 21:51:03
【问题描述】:

我正在尝试将一个 omg 与文本对齐,但标签 <p>打破了这一行。我想做这样的事情

但我的代码就是这样做的

,这就是我的代码:

       <div class="mb-10 mx-auto w-full max-w-sm fixed top-4 left-6 inline-block">
          <div >
            <a href="">
              <img src="../Assets/Img/logo.svg" class="h-10 w-10" alt="">
              <div class="space-y-2 text-left">
                <p class="font-bold text-purple-700 text-2xl">Vuexy</p>
              </div>
            </a>
          </div>
        </div>

【问题讨论】:

    标签: css laravel tailwind-css laravel-breeze


    【解决方案1】:

    您可以将flex 实用程序类应用于您的a 元素。

    <div class="mb-10 mx-auto w-full max-w-sm fixed top-4 left-6 inline-block">
      <a href="" class="flex">
        <img src="../Assets/Img/logo.svg" class="h-10 w-10 mr-4" alt="">
        <p class="font-bold text-purple-700 text-2xl">Vuexy</p>
      </a>
    </div>
    

    【讨论】:

      猜你喜欢
      • 2021-07-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-02-22
      • 1970-01-01
      • 2014-09-11
      • 2014-02-05
      • 2021-08-12
      相关资源
      最近更新 更多