Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用 Bootstrap 作为我的 UI 框架,并且导航栏固定在顶部。我想要一个覆盖全屏的叠加层。目前,导航栏没有被接管。
这可能吗?
Bootstrap 导航栏的 z-index 为 1030,这意味着您可能需要 CSS z-index 属性至少为 1031。
overlay { z-index: 1031; }
实际上,导航栏也确实被接管了。但是,它的z-index属性大于覆盖。只需将其添加到您的 CSS 中:
z-index
.modal-backdrop { z-index: 100000; }