html - 出现在固定 div 上的模态叠加
问题描述
我正在使用 Tailwind CSS,我在一些 CSS 中遇到了这个问题,其中作为按钮的模态覆盖不会出现在其他设置为fixed
.
下面的链接是代码,这里是问题的预览。
https://codesandbox.io/s/tailwind-css-vre8j
div 的边框和标签背景在叠加层之上
我试图设置z-index
问题 div 的叠加层和容器,但它忽略了它。
此处的示例是实际页面的精简版。尽可能多地删除它们以显示问题。
解决方案
您必须让叠加层上的 z-index 大于其他元素上的 z-index。 https://codesandbox.io/s/tailwind-css-hdx75
在这里,您可以看到我使用 z-10 表示“billy bob Junior box”,使用 z-20 表示覆盖层及其包装
推荐阅读
- image-processing - 自适应傅里叶滤波器
- css - 角度/引导轮播中的图像不居中
- apache-nifi - NiFi:带有 QueryDatabaseTableRecord 组件的问题
- jelastic - 达到最大子进程限制:2,额外:0,当前:2,忙碌:2,请增加 LSAPI_CHILDREN
- scala - Scala/Spark - 将 Word2vec 输出转换为数据集[_]
- php - Laravel:使用 where 子句按 id 计算行数和分组
- flutter - 如何更新 AlertDialog 小部件中的 var?
- javascript - Node js获取正在上传的文件的名称
- kubernetes - 当 pod 卡在挂起状态时,我们可以在 statefulset 中为 pod 添加重启时间吗?
- c++ - 如何修复“clang: error: linker command failed with exit code 1 (use -v to see invocation)”错误?