[英]Having problem with borders on segmented button using tailwind
尝试创建分段按钮,但边框有问题。 我想到处都有 1px 的边框,包括按钮之间
第二个变体的结构(按钮动态呈现)
<div class="divide-x">
<button class="border-y first:border-l last:border-r">
</div>
我尝试了多种边界方式
有什么建议么?
像这样?
<div class="divide-x divide-black border border-black rounded-full">
<button class="py-2 px-8">hello</button>
<button class="py-2 px-8">hello</button>
<button class="py-2 px-8">hello</button>
<button class="py-2 px-8">hello</button>
</div>
或者像这样?
<div class="flex">
<button class="py-2 px-8 border-y border-l first:rounded-l-full last:border-r last:rounded-r-full border-black">hello</button>
<button class="py-2 px-8 border-y border-l first:rounded-l-full last:border-r last:rounded-r-full border-black">hello</button>
<button class="py-2 px-8 border-y border-l first:rounded-l-full last:border-r last:rounded-r-full border-black">hello</button>
<button class="py-2 px-8 border-y border-l first:rounded-l-full last:border-r last:rounded-r-full border-black">hello</button>
</div>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.