简体   繁体   中英

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. 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:

  .modal-wrapper {
    background-color: white;
  }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM