首页 > 解决方案 > ngx-material-timepicker:iPhone css 忽略“位置:固定”

问题描述

我创建了一个 StackBlitz 来重现:https ://stackblitz.com/edit/angular-rdzdxx

它有一个带有以下 css 的 ngx-material-timepicker:

.timepicker-backdrop-overlay[_ngcontent-c23] {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    background-color: rgba(0,0,0,.3);
    z-index: 999;
    pointer-events: auto;
}

仅在 iPhone 中,css 被锁定在子组件中。在 Android 和桌面上,它按预期工作。有一个已知的解决方案吗?在此处输入图像描述

标签: cssangularpositionmobile-safari

解决方案


是的@dmcgrandle,这似乎是 z-index 问题。但是我找到了一个带有以下代码的补丁。'custom-tabbar'在标签栏顶部添加并覆盖 CSS,如下所示。

.custom-tabbar .mat-tab-body-active {
  overflow: visible !important;
  position: static;
}

我没有签入 iPhone,但我签入了模拟器。希望它对你有用。


推荐阅读