[英]Ionic 4 Modal Backdrop
I'm attempting to fix the way my modal works when presented.我正在尝试修复我的模态在呈现时的工作方式。
When the screen size is large it has a translucent backdrop due to the min-height css.当屏幕尺寸很大时,由于 min-height css,它有一个半透明的背景。 I don't mind that min height, I just want it all to be white.
我不介意最小高度,我只希望它都是白色的。
It is created normally then presented:它通常创建然后呈现:
this.modalCtrl.create({
component: AddCommentPage,
componentProps: { id: this.place.id }
}).then((element) => element.present());
Here is a view when the screen is large:这是屏幕大时的视图:
And when it is small (should be full screen):当它很小时(应该是全屏):
I fixed it by adding the following code into my .scss file:我通过将以下代码添加到我的 .scss 文件中来修复它:
.modal-wrapper {
background-color: white;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.