首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >顺风css图片下的文本对齐?

问顺风css图片下的文本对齐?
EN

Stack Overflow用户
提问于 2022-03-27 14:56:26
回答 2查看 658关注 0票数 0

我想对齐图片下面的文字,这是我正在做的事情的截图。

​

在这里帮助我,我希望代码在顺风css中。

EN

回答 2

Stack Overflow用户

发布于 2022-03-27 18:11:35

你是说像这样吗?

​

代码语言:javascript
复制
<script src="https://cdn.tailwindcss.com"></script>
<div class=" p-8 bg-gray-100">

    <div class="w-96 flex justify-start space-x-3 bg-gray-200 h-48   rounded-md p-8">
      <div class="space-y-4 text-center">
          <div class="w-16 h-16 bg-teal-700 rounded-full"></div>
          <h1 class=" px-2  py-0.5 bg-gray-50 border-2  border-gray-300 ">First Name</h1>
      </div>
      <div class="space-y-4 text-center">
          <div class="w-16 h-16 bg-teal-700 rounded-full"></div>
          <h1 class=" px-2   py-0.5 bg-gray-50 border-2   border-gray-300 ">SecondName</h1>
      </div>
    </div>

</div>

​

票数 0
EN

Stack Overflow用户

发布于 2022-03-28 17:26:43

你只需要这么做。对我来说很管用。

代码语言:javascript
复制
          <div class="flex p-10 ">
            <div class="mx-5">
                <div class="w-20 h-20 ">
                    <img src="https://comps.gograph.com/penguin-emotional-head-vector-illustration-of-cute-arctic-bird-in-sunglasses-shows-emotion-cool-emoji-smiley-icon-print-chat-communication-penguin-in-flat-cartoon-style-on-blue-background_gg103004116.jpg" className="rounded-full"/>
                </div>
                <p class="mt-3 p-1 border-2 border-teal-200 ">Zain UI Adideen</p>
            </div>
            <div class="mx-5">
                <div class="w-20 h-20">
                    <img src="https://comps.gograph.com/penguin-emotional-head-vector-illustration-of-cute-arctic-bird-in-sunglasses-shows-emotion-cool-emoji-smiley-icon-print-chat-communication-penguin-in-flat-cartoon-style-on-blue-background_gg103004116.jpg" className="rounded-full"/>
                </div>
                <p class="mt-3 p-1 border-2 border-teal-200 ">Akira Ito</p>
            </div>
        </div>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71637433

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档