Tailwind css 溢出下拉问题

Tailwind css overflow dropdown issue

让下拉菜单显示其完整高度和圆角的最佳方法是什么 table?

有人建议删除 overflow-hidden。但如果它被移除,圆角看起来很难看。没有溢出隐藏,下拉列表隐藏在 table 长度之后。

https://play.tailwindcss.com/gZeMiyEPmm

任何帮助将不胜感激。

我找到的最简单的解决方案是删除 overflow-hidden 并添加 sm:rounded-[xy]-lg(其中 x 是 bt,y 是 lr) 以正确 ths 和 tds.

为了简化事情,我认为将其添加到您的 css:

会更容易
table thead tr th:first-of-type {
  @apply sm:rounded-tl-lg;
}

table thead tr th:last-of-type {
  @apply sm:rounded-tr-lg
}

table tbody tr:last-of-type td:first-of-type {
    @apply sm:rounded-bl-lg;
}

table tbody tr:last-of-type td:last-of-type {
    @apply sm:rounded-br-lg;
}