【发布时间】:2021-11-07 00:45:21
【问题描述】:
我很难在文本下方的线条上制作边框半径,而且我也有关于如何在文本和底线之间放置间距的问题。 这是我的预期输出
预期输出 -> https://ibb.co/RSKytWm
Codepen -> Codepen
代码
<div class="
min-h-screen
flex
items-center
justify-center
py-4
px-4
sm:px-6
lg:px-6
bg-black
">
<div class="max-w-lg w-full space-y-8">
<div class="flex flex-col w-full px-4 py-4 sm:px-6 md:px-8">
<div class="flex flex-row justify-center">
<button class="
inline-flex
items-end
justify-center
h-20
w-28
text-white
font-regular
border-b-4 border-white
rounded-3xl
">
Personal Details
</button>
<button class="
inline-flex
items-end
justify-center
h-20
w-28
text-white
font-regular
border-b-4 border-white
rounded-3xl
mr-10
ml-10
">
Contact Details
</button>
<button class="
inline-flex
items-end
justify-center
h-20
w-28
text-white
font-regular
border-b-4 border-white
rounded-3xl
">
Other Details
</button>
</div>
</div>
</div>
</div>
【问题讨论】:
-
文本和边框之间的间距。您可以通过使用 padding bottom 来实现这一点。示例:
pb-2 -
@Lowgy。是的,但是线的边界半径呢?
-
@Joesph 现在正在调查边界。
-
@Lowgy 谢谢。如果按钮不适用于此场景,您可以更改它,只要它看起来像我发布的图像即可
-
我试图在文本下方的按钮内放置一个跨度。它只是您想要实现的“边界”的形状。
标签: css tailwind-css tailwind-ui