zoukankan      html  css  js  c++  java
  • [Angular] Stagger animation v4.3.3

    For example, when we open a form, we want to see all the inputs fields comes into one by one.

    Code for html:

         <div class="payment-form" [@jumpIntoPage]>
    
              <label>Email:</label>
              <au-fa-input class="form-input" icon="envelope">
                <input auInput type="email" placeholder="Email">
              </au-fa-input>
    
              <label>Name:</label>
              <input class="form-input" placeholder="Name">
    
              <label>Card Number:</label>
              <au-fa-input icon="cc-stripe" class="form-input">
                <input auInput placeholder="Card Number" au-mask="9999 9999 9999 9999">
              </au-fa-input>
    
              <label>Card Date:</label>
              <input placeholder="Date" au-mask="19/9999" class="form-input">
    
              <label>CVC:</label>
              <input placeholder="CVC" au-mask="999" class="form-input">
    
              <label>Coupon Code:</label>
              <input placeholder="Coupon Code (optional)" class="form-input">
    
              <button class="modal-button">Trigger Stripe Payment</button>
    
            </div>

    So we add a animation to the container called 'jumpIntoPage'.

    Animation:

    export const jumpIntoPage = trigger('jumpIntoPage', [
      transition(':enter', [
        query('.form-input', style({transform: 'translateY(-50px)', opacity: 0})),
        query('.form-input', [
          stagger(180, [animate('300ms ease-in', style('*'))])
        ])
      ])
    ]);
  • 相关阅读:
    问题账户需求分析
    2017年秋季个人阅读计划
    读“我们应当怎样做需求分析”有感
    开发体会
    第二阶段个人总结10
    第二阶段个人总结09
    第二阶段个人总结08
    个人进度(13)
    个人进度(12)
    个人进度(11)
  • 原文地址:https://www.cnblogs.com/Answer1215/p/7325801.html
Copyright © 2011-2022 走看看