为什么当我在另一个模态之上打开一个模态时,我的离子背景 + 模态阴影样式不起作用?
前言:这在 V4 上运行良好,但在升级到 V5 时出现故障。我不想更改我的页面方法,只需修复 CSS/任何实际导致以下问题的内容。
我的应用程序打开一个带有自定义 css 的模式页面以使其全屏显示。
然后我可以在顶部打开另一个正常模式(但不是全屏)。第二个模式缺少离子背景及其边框阴影样式。
我可以看到 ion-backdrop 肯定在 DOM 中,但显然没有显示。
Step1 Fine 在此输入图片说明
第 2 步 - 破碎的离子背景: 在此处输入图像描述
显示我的自定义模式:
async showClipboard() {
const modal = await this._ModalController.create({
component: ClipboardPage,
cssClass: 'custom-round-modal',
componentProps: {
user: this.user
},
showBackdrop: true
});
await modal.present();
}
Run Code Online (Sandbox Code Playgroud)
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; …Run Code Online (Sandbox Code Playgroud)