zoukankan      html  css  js  c++  java
  • 动画方案 Lottie 学习(二)之实战

    代码

    $('.success-info-title').append('<p class="normal_finish" id="normal_finish_anima" > </p>');
     
    var animaPaht = data.changeSkinFlag&&data.changeSkinFlag == 'midAutumnSkin' ? '/pay/js/biz/midAutumnNomrmalAnimaData.json': '/pay/js/biz/normalUserFinishAnimaData.json';
          window.Ariel.JSLoader.load('/pay/js/biz/lottie_svg.js', function () {
                  var animation = bodymovin.loadAnimation({
                  container: document.getElementById('normal_finish_anima'),
                  renderer: 'svg',
                  loop: false,
                  autoplay: true,
                  path: animaPaht
         });
     
     
      setTimeout(function () { // 动画延迟播放
             animation.play();
        }, 200);
    });

    引入文件

    注意

    不能对已经存在的html添加lottie动画

     

  • 相关阅读:
    PG-日常管理
    PG-高可用(pgpool-Ⅱ)
    PG-基准测试
    PG-备份恢复
    PG-并发问题
    Go-常量
    Go-变量
    Oracle-11g升级PSU补丁
    Oracle-`sqlplus`工具使用技巧
    [CF1051F] The Shortest Statement
  • 原文地址:https://www.cnblogs.com/kunmomo/p/11806854.html
Copyright © 2011-2022 走看看