如何在角离子应用程序中对条件元素进行动画处理

时间:2018-07-04 11:52:34

标签: angular css3 ionic-framework css-transitions

以下html在同一html页面上具有两个容器元素。 *ngIf设置为true时,将显示任何一个内容。 两种情况之间的动画非常突然,如何在条件内获取动画?

  <div *ngIf="init && show">

    <div class="intro-container">

      <p text-wrap> Here is all the static content</p>
      <p text-wrap> This is the second static content </p>

    </div>

    <button ion-button clear block (click)="show = false">Continue</button>

  </div>

  <div *ngIf="init && !show">

    <div class="intro-container2">

      <p text-wrap> Heya! You landed on this page but this is the same page </p>
      <p text-wrap> Static </p>

    </div>

  </div>

0 个答案:

没有答案