【发布时间】:2021-11-20 14:30:56
【问题描述】:
检查此代码
.parent {
visibility: hidden;
position: relative;
z-index: 1;
}
.child {
visibility: visible;
}
<button class="parent">
<span class="child">content</span>
</button>
在 Mac 上的 Firefox 中,.child 仍然不可见。
在 chrome 和 safari 中 .child 是可见的。
有什么办法解决这个问题吗?
【问题讨论】:
-
老实说,我会更改标记。对我来说,隐藏父母并让孩子可见是没有意义的。最有可能的情况之一是规范的错误实现,您对此无能为力。
标签: css button firefox z-index