【发布时间】:2020-10-10 07:18:40
【问题描述】:
为什么当我在另一个模态之上打开一个模态时,我的离子背景 + 模态阴影样式不起作用?
前言:这在 V4 上运行良好,但在升级到 V5 时中断。我不想更改我的页面方法,只需修复 CSS/实际上导致以下问题的任何内容。
-
我的应用会打开一个带有自定义 css 的模态页面以使其全屏显示。
然后我可以在 最佳。这第二个模态缺少离子背景及其边框阴影 样式。
我可以看到 ion-backdrop 肯定在 DOM 中,但它是 显然没有显示。
Step1 很好 enter image description here
第 2 步 - 破碎的离子背景: enter image description here
显示我的自定义模式:
async showClipboard() {
const modal = await this._ModalController.create({
component: ClipboardPage,
cssClass: 'custom-round-modal',
componentProps: {
user: this.user
},
showBackdrop: true
});
await modal.present();
}
CSS:
@media only screen and (min-width: 768px) {
.custom-round-modal {
.modal-wrapper {
border-radius: 15px !important;
-moz-border-radius: 15px !important;
-webkit-border-radius: 15px !important;
.ion-page {
border-radius: 15px !important;
-moz-border-radius: 15px !important;
-webkit-border-radius: 15px !important;
}
}
}
}
【问题讨论】:
标签: modal-dialog ionic4 ionic5