滚动时 Blazor EditForm 越过 MainLayout

Blazor EditForm goes over MainLayout when scrolling

我有这个 Blazor WASM,它的 MainLayout 顶部带有徽标和其他东西。在子窗体上我有一个 Editform 这个工作正常,但是当我滚动页面时,EditForm 滚动到 MainForm 的顶部而不是下面。其他内容在子滚动条下。 有任何想法吗? 亲切的问候

当您说 MainForm 时 - 您指的是屏幕顶部的栏吗?如果是这样,请进入您的 site.css 并将 z-index:9999; 添加到您的 .main .top-row 部分。它看起来应该类似于:

.main {
    flex: 1;
}

.main .top-row {
    background-color: #f7f7f7;
    border-bottom: 1px solid #d6d5d5;
    justify-content: flex-end;
    **z-index: 9999;**
}

    .main .top-row > a, .main .top-row .btn-link {
        white-space: nowrap;
        margin-left: 1.5rem;
    }

.main .top-row a:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
}