<bdo id='Erl7G'></bdo><ul id='Erl7G'></ul>

      1. <legend id='Erl7G'><style id='Erl7G'><dir id='Erl7G'><q id='Erl7G'></q></dir></style></legend>

        <small id='Erl7G'></small><noframes id='Erl7G'>

        <tfoot id='Erl7G'></tfoot>
      2. <i id='Erl7G'><tr id='Erl7G'><dt id='Erl7G'><q id='Erl7G'><span id='Erl7G'><b id='Erl7G'><form id='Erl7G'><ins id='Erl7G'></ins><ul id='Erl7G'></ul><sub id='Erl7G'></sub></form><legend id='Erl7G'></legend><bdo id='Erl7G'><pre id='Erl7G'><center id='Erl7G'></center></pre></bdo></b><th id='Erl7G'></th></span></q></dt></tr></i><div id='Erl7G'><tfoot id='Erl7G'></tfoot><dl id='Erl7G'><fieldset id='Erl7G'></fieldset></dl></div>
      3. 使用模态和样式的 Ionic 2 登录弹出窗口

        时间:2023-09-08
        <i id='0Pa3S'><tr id='0Pa3S'><dt id='0Pa3S'><q id='0Pa3S'><span id='0Pa3S'><b id='0Pa3S'><form id='0Pa3S'><ins id='0Pa3S'></ins><ul id='0Pa3S'></ul><sub id='0Pa3S'></sub></form><legend id='0Pa3S'></legend><bdo id='0Pa3S'><pre id='0Pa3S'><center id='0Pa3S'></center></pre></bdo></b><th id='0Pa3S'></th></span></q></dt></tr></i><div id='0Pa3S'><tfoot id='0Pa3S'></tfoot><dl id='0Pa3S'><fieldset id='0Pa3S'></fieldset></dl></div>

              <tbody id='0Pa3S'></tbody>

            <small id='0Pa3S'></small><noframes id='0Pa3S'>

                <tfoot id='0Pa3S'></tfoot>
                <legend id='0Pa3S'><style id='0Pa3S'><dir id='0Pa3S'><q id='0Pa3S'></q></dir></style></legend>
                • <bdo id='0Pa3S'></bdo><ul id='0Pa3S'></ul>
                  本文介绍了使用模态和样式的 Ionic 2 登录弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我有一个项目,我想在其中使用这种类型的登录:

                  I have a projet where i want to use this type of login :

                  我已经正确设置了一个模式,我可以毫无问题地关闭它,但我的问题是它占据了整个页面,我只是希望它与图片中一样.

                  I have set up a modal correctly and i can dismiss it with no problem, but my problem is that it take the entire page, and i just want it to be as in the picture.

                  我不知道如何选择 css 文件中的所有页面,已尝试使用 * 但它与 html 文件中的内容混淆了太多.

                  I don't know how to select all page in css file, already tried with * but it messing too much with what is inside the html file.

                  提前谢谢你!

                  打开模态页面的代码:

                    showLogin() {
                  let modal = this.modalCtrl.create(LoginPage);
                  // this.navCtrl.push(modal);
                  modal.present();
                  }
                  

                  模态代码:HTML:

                  <ion-navbar class="modal-wrapper" *navbar>
                    <ion-title>Sample Modal</ion-title>
                  </ion-navbar>
                  <ion-content padding class="sample-modal-page">
                    <p>my sample modal page<p>
                       <ion-buttons start>
                          <button (click)="dismiss()">
                            Cancel
                          </button>
                        </ion-buttons>
                  </ion-content>
                  

                  CSS:

                  page-login {
                      .modal-wrapper {
                          padding: 30px;
                          background: rgba(0,0,0,0.5);
                      }
                  }
                  

                  TS:

                  import { Component } from '@angular/core';
                  import { NavController, NavParams, ViewController } from 'ionic-angular';
                  
                  @Component({
                    selector: 'page-login',
                    templateUrl: 'login.html'
                  })
                  export class LoginPage {
                  
                    constructor(public navCtrl: NavController, public navParams: NavParams,public viewCtrl: ViewController) {}
                  
                    dismiss(data) {
                      this.viewCtrl.dismiss(data);
                    }
                  
                  }
                  

                  我的错误可能在html和css之间

                  My mistake is probably between html and css

                  推荐答案

                  我终于明白了,我没有选择正确的属性.

                  I got it finnaly, i was not selecting the right attribute.

                  这里有什么效果:

                  page-login {
                      .sample-modal-page {
                          padding: 30px;
                          background: rgba(0,0,0,0.5);
                      }
                  }
                  

                  感谢 varun aaruru 帮助我,感谢他为出色的编辑提供的所有特点

                  Thank you to varun aaruru for helping me and all the caracteristic he gave for nice editing

                  在这里您还可以找到一篇很好的帖子,讨论如何设计它:https://forum.ionicframework.com/t/custom-modal-alert-with-html-form/47980/19

                  here you can also find a nice post talking about how to nicely design it : https://forum.ionicframework.com/t/custom-modal-alert-with-html-form/47980/19

                  这篇关于使用模态和样式的 Ionic 2 登录弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:将 gregorian 日期转换为 angular 2 和 Ionic 2 中的波斯 下一篇:如何在角度2中动态更改css类名

                  相关文章

                  最新文章

                  <tfoot id='U7NWl'></tfoot>

                  <small id='U7NWl'></small><noframes id='U7NWl'>

                    • <bdo id='U7NWl'></bdo><ul id='U7NWl'></ul>

                    <legend id='U7NWl'><style id='U7NWl'><dir id='U7NWl'><q id='U7NWl'></q></dir></style></legend>

                      <i id='U7NWl'><tr id='U7NWl'><dt id='U7NWl'><q id='U7NWl'><span id='U7NWl'><b id='U7NWl'><form id='U7NWl'><ins id='U7NWl'></ins><ul id='U7NWl'></ul><sub id='U7NWl'></sub></form><legend id='U7NWl'></legend><bdo id='U7NWl'><pre id='U7NWl'><center id='U7NWl'></center></pre></bdo></b><th id='U7NWl'></th></span></q></dt></tr></i><div id='U7NWl'><tfoot id='U7NWl'></tfoot><dl id='U7NWl'><fieldset id='U7NWl'></fieldset></dl></div>