我试图让文字在左侧,图标在右侧,但现在图标位于文字上方,如第一张图片所示。我希望该图标位于“项目名称”的右上角,并使文本看起来像第二张图片。
<!-- Tailwind -->
<link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet">
<!-- Body -->
<div class="flex card bg-neutral h-48 px-3 hover:bg-primary">
<svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14" />
</svg>
<h2 class="text-2xl font-bold text-white py-3">Project name</h2>
<p class="text-left py-4 font-bold group-hover:bg-primary">Explaination of the project</p>
<p class="text-left pb-4 font-bold">Tag, tag, tag</p>
</div>
tailwind
。可能没有 CSS,对于一个带有框架标签的问题也不应该是必需的。 - tacoshy