【问题标题】:Show div on top of Kendo for Angular Dialog在 Kendo 上为 Angular Dialog 显示 div
【发布时间】:2019-04-09 10:40:04
【问题描述】:

在这个StackBlitz 中,我有一个用于 Angular 对话框的 Kendo。在对话框中有一个带有position:absolute 的 div,我需要显示在对话框的顶部,而不是在其中,并且对话框不应该有任何滚动条。有没有办法做到这一点?

@Component({
    selector: 'my-app',
    template: `
        <kendo-dialog title="Kendo Dialog" 
              style="position:relative;overflow:visible"
             [width]="400" [height]="100">
            <div id="div1">Some text in the div</div>
        </kendo-dialog>
    `,
    styles: [`
         #div1 {
           position: absolute;
           top: 20px;
           left: 240px;
           width: 300px;
           z-index: 99990;
           background-color: #f0f0f0;
           border: 2px solid blue;
         }
    `]

})
export class AppComponent {

}

【问题讨论】:

    标签: angular kendo-ui kendo-ui-angular2


    【解决方案1】:

    将此添加到组件样式中:

        my-app .k-window-content {
            overflow: visible !important;
        }
    

    【讨论】:

    • 伟大的。修复了我面临的同样问题,以及这个问题:.k-grid td { overflow:visible } 因为我不得不从我的单元格溢出:)
    猜你喜欢
    • 1970-01-01
    • 2015-10-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-23
    • 2023-01-26
    • 2013-12-27
    相关资源
    最近更新 更多