如何调整模态高度?

时间:2017-02-13 08:01:10

标签: angular typescript ionic2

我在使用设备打开模态页面时遇到问题。问题是它填满了页面而不是弹出。可能是什么问题?模式会在Web浏览器中弹出,但它会在设备上打开,但它会填充页面。我怎样才能解决这个问题。最诚挚的问候

import {Component} from '@angular/core';
import {Network, Toast} from "ionic-native";
import {ModalPagePage} from '../modal-page/modal-page';
import {NavController, Platform,ModalController} from 'ionic-angular';

@Component({
  selector: 'page-home',
  templateUrl: 'home.html'
})
export class HomePage {

  public people: Array<Object>;
  onDevice: boolean;


  constructor(public navCtrl: NavController, public modalCtrl: ModalController) {


    this.platform.ready().then(() => {

      this.onDevice = this.platform.is('cordova');



    });

  }




  presentProfileModal() {
    let profileModal = this.modalCtrl.create(ModalPagePage);

    profileModal.present();
  }




}

1 个答案:

答案 0 :(得分:0)

.modal-wrapper {
    position: absolute !important;
    width: 93vw !important;
    height: 260px !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    margin: auto !important;
}

.modal .backdrop {
    display: block !important;
}

在mod.scss中超越modal的默认CSS。