vue中怎么初始化加载动画

这期内容当中小编将会给大家带来有关vue中怎么初始化加载动画,文章内容丰富且以专业的角度为大家分析和叙述,阅读完这篇文章希望大家可以有所收获。

成都创新互联公司专注于景泰网站建设服务及定制,我们拥有丰富的企业做网站经验。 热诚为您提供景泰营销型网站建设,景泰网站制作、景泰网页设计、景泰网站官网定制、成都微信小程序服务,打造景泰网络公司原创品牌,更为您提供景泰网站排名全网营销落地服务。

1.在入口文件index.html中加入loading动画:



 
  
  
  
  
  
  
  
   #Loading {
    top:50%;
    left:50%;
    position: absolute;
    -webkit-transform: translateY(-50%) translateX(-50%);
    transform: translateY(-50%) translateX(-50%);
    z-index:100;
   }
   @-webkit-keyframes ball-beat {
    50% {
     opacity: 0.2;
     -webkit-transform: scale(0.75);
     transform: scale(0.75); }

    100% {
     opacity: 1;
     -webkit-transform: scale(1);
     transform: scale(1); } }

   @keyframes ball-beat {
    50% {
     opacity: 0.2;
     -webkit-transform: scale(0.75);
     transform: scale(0.75); }

    100% {
     opacity: 1;
     -webkit-transform: scale(1);
     transform: scale(1); } }

   .ball-beat > div {
    background-color: #279fcf;
    width: 15px;
    height: 15px;
    border-radius: 100% !important;
    margin: 2px;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
    display: inline-block;
    -webkit-animation: ball-beat 0.7s 0s infinite linear;
    animation: ball-beat 0.7s 0s infinite linear; }
   .ball-beat > div:nth-child(2n-1) {
    -webkit-animation-delay: 0.35s !important;
    animation-delay: 0.35s !important; }
  

 
 
  
   
    
    
    
   
  
  
    

2.在app.vue的created方法中:

created() { document.body.removeChild(document.getElementById('Loading'))  
}

上述就是小编为大家分享的vue中怎么初始化加载动画了,如果刚好有类似的疑惑,不妨参照上述分析进行理解。如果想知道更多相关知识,欢迎关注创新互联行业资讯频道。


标题名称:vue中怎么初始化加载动画
文章地址:http://scjbc.cn/article/jjjddj.html

其他资讯