vue数据加载等待组件

 

关于loading组件的。

loading.vue

<template>
    <div class="loading">
        <div class="mock">数据加载中</div>
        <div class="loader-inner ball-pulse">
            <div></div>
            <div></div>
            <div></div>
        </div>
    </div>
</template>
<script>
    export default {
        data(){
            return{

            }
        }
    };
</script>

<style scoped>
  .loading{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index:30;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    opacity: 0.6;
  }
  .loading .mock{
    height: 30px;
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 25px;/*px*/
    color: #03a9f4;
    /*text-align: center;*/
    line-height: 30px;
  }
  .ball-pulse{
    position: absolute;
    top: 50%;
    left: 45%;
    transform: translateX(-22%);
  }
  .loading .ball-pulse div{
    background-color: #03a9f4;
    width: 30px;
    height: 30px;
    border-radius: 100%;
    margin: 2px;
    animation-fill-mode: both;
    display: inline-block;
  }
  .loading .ball-pulse div:nth-child(1){
    animation: scale 0.75s -0.24s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08);
  }
  .loading .ball-pulse div:nth-child(2){
    animation: scale 0.75s -0.12s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08);
  }
  .loading .ball-pulse div:nth-child(3){
    animation: scale 0.75s 0s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08)
  }


@-webkit-keyframes scale {
  0% {
    -webkit-transform: scale(1);
    transform: scale(1);
    opacity: 1;
  }
  45% {
    -webkit-transform: scale(0.1);
    transform: scale(0.1);
    opacity: 0.7;
  }
  80% {
    -webkit-transform: scale(1);
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes scale {
  0% {
    -webkit-transform: scale(1);
    transform: scale(1);
    opacity: 1;
  }
  45% {
    -webkit-transform: scale(0.1);
    transform: scale(0.1);
    opacity: 0.7;
  }
  80% {
    -webkit-transform: scale(1);
    transform: scale(1);
    opacity: 1;
  }
}
</style>

 

转载于:https://www.cnblogs.com/WangXinPeng/p/9415448.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值