visibility:hidden + z-index 使按钮在 Firefox 中不可见
visibility:hidden + z-index makes button invisible in Firefox
检查此代码
.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 可见。
有什么解决办法吗?
Firefox 开发者修复了它,bugzilla.mozilla.org/show_bug.cgi?id=1732921
检查此代码
.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 可见。
有什么解决办法吗?
Firefox 开发者修复了它,bugzilla.mozilla.org/show_bug.cgi?id=1732921