在 Tailwind 上使用侧边按钮输入 CSS
Input with side button on Tailwind CSS
我想做这样的事情:
但是当我在我的代码中尝试一些东西时,只需显示:
这是我的代码:
<div class="lg:grid justify-center mt-4 flex">
<BreezeInput2
id="email"
type="email"
class="mt-1 block w-full focus:shadow-md"
required
autofocus
autocomplete="username"
placeholder="email@email.com"
/>
<a class="rounded-md py-2 px-6 cursor-pointer tracking-wider text-md inline-table w-full
items-center
text-center bg-purple-600 text-white font-bold hover:bg-purple-600 hover:shadow-purple mt-3
"
:href="route('dashboard')"
>
Notify
</a>
</div>
将此行 <div class="lg:grid mt-4 flex">
更改为 <div class="justify-center mt-4 flex">
因为您已经应用了 flex class.
我可能会先删除 grid
style from your container since you already have a flexbox, and then adding flex-row
. After that, remove your inline-table
utility from your anchor tag, and add a flex
实用程序。这应该会让您走上正轨!
您需要任何其他帮助,请告诉我或在这里提出。 https://play.tailwindcss.com/
我想做这样的事情:
但是当我在我的代码中尝试一些东西时,只需显示:
这是我的代码:
<div class="lg:grid justify-center mt-4 flex">
<BreezeInput2
id="email"
type="email"
class="mt-1 block w-full focus:shadow-md"
required
autofocus
autocomplete="username"
placeholder="email@email.com"
/>
<a class="rounded-md py-2 px-6 cursor-pointer tracking-wider text-md inline-table w-full
items-center
text-center bg-purple-600 text-white font-bold hover:bg-purple-600 hover:shadow-purple mt-3
"
:href="route('dashboard')"
>
Notify
</a>
</div>
将此行 <div class="lg:grid mt-4 flex">
更改为 <div class="justify-center mt-4 flex">
因为您已经应用了 flex class.
我可能会先删除 grid
style from your container since you already have a flexbox, and then adding flex-row
. After that, remove your inline-table
utility from your anchor tag, and add a flex
实用程序。这应该会让您走上正轨!
您需要任何其他帮助,请告诉我或在这里提出。 https://play.tailwindcss.com/