tailwind-css - Tailwind css溢出下拉问题
问题描述
使用圆角桌让下拉列表显示其全高的最佳方法是什么?
有人建议应该删除溢出隐藏。但如果它被删除,圆角看起来很难看。没有溢出隐藏,下拉列表在表格长度之后隐藏。
https://play.tailwindcss.com/gZeMiyEPmm
任何帮助将不胜感激。
解决方案
我发现的最简单的解决方案是删除overflow-hidden
并添加sm:rounded-[xy]-lg
(其中 x 是b
ort
和 y 是l
or r
)到正确th
的 s 和td
s。
为了简化事情,我认为将其添加到您的 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;
}
推荐阅读
- java - Android App intellij Layout_marginBottom 添加到顶部
- sql - 使用标量值和 JSON 对象作为 JSON 值
- java - 尝试从 Java 中的方法返回 float[]
- php - 在拥有方找到一对多单向原则
- java - 对象的等于方法?
- django - Django HTML模板表格渲染
- java - 当包含区域信息时反序列化 LocalDateTime
- javascript - 对 mLab 的查询不起作用 - CastError: Cast to ObjectId failed for value
- node.js - node.js npm ping 错误 times.push(parseFloat(match
- java - 当使用静态对象锁不起作用?