【问题标题】:Tailwind css overflow dropdown issueTailwind css溢出下拉问题
【发布时间】:2021-10-14 14:37:05
【问题描述】:

使用圆角桌让下拉菜单显示其全高的最佳方式是什么?

有建议应该删除溢出隐藏。但如果它被删除,圆角看起来很难看。没有overflow-hidden,下拉菜单在表格长度之后隐藏。

https://play.tailwindcss.com/gZeMiyEPmm

任何帮助将不胜感激。

【问题讨论】:

    标签: tailwind-css


    【解决方案1】:

    我发现的最简单的解决方案是删除overflow-hidden 并将sm:rounded-[xy]-lg(其中x 是bt,y 是lr)添加到正确的th s 和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;
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-11-10
      • 1970-01-01
      • 2021-03-15
      • 1970-01-01
      • 1970-01-01
      • 2023-01-07
      • 1970-01-01
      • 2021-08-20
      相关资源
      最近更新 更多