CSS~等待效果实现
  iS8lx3oOvPxh 2023年11月02日 41 0
<style>
    .first-loading-wrp {
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: column;
      min-height: 420px;
      height: 100%;
      margin-top: 150px;
    }

    .first-loading-wrp .loading-wrp {
      padding: 98px;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .dot {
      animation: antRotate 1.2s infinite linear;
      transform: rotate(45deg);
      position: relative;
      display: inline-block;
      font-size: 32px;
      width: 32px;
      height: 32px;
      box-sizing: border-box;
    }

    .dot i {
      width: 14px;
      height: 14px;
      position: absolute;
      display: block;
      background-color: #1890ff;
      border-radius: 100%;
      transform: scale(0.75);
      transform-origin: 50% 50%;
      opacity: 0.3;
      animation: antSpinMove 1s infinite linear alternate;
    }

    .dot i:nth-child(1) {
      top: 0;
      left: 0;
    }

    .dot i:nth-child(2) {
      top: 0;
      right: 0;
      -webkit-animation-delay: 0.4s;
      animation-delay: 0.4s;
    }

    .dot i:nth-child(3) {
      right: 0;
      bottom: 0;
      -webkit-animation-delay: 0.8s;
      animation-delay: 0.8s;
    }

    .dot i:nth-child(4) {
      bottom: 0;
      left: 0;
      -webkit-animation-delay: 1.2s;
      animation-delay: 1.2s;
    }

    @keyframes antRotate {
      to {
        -webkit-transform: rotate(405deg);
        transform: rotate(405deg);
      }
    }

    @-webkit-keyframes antRotate {
      to {
        -webkit-transform: rotate(405deg);
        transform: rotate(405deg);
      }
    }

    @keyframes antSpinMove {
      to {
        opacity: 1;
      }
    }

    @-webkit-keyframes antSpinMove {
      to {
        opacity: 1;
      }
    }

    #app {
      height: 100%;
    }
  </style>
<div class="first-loading-wrp">     
      <div class="loading-wrp">
        <span class="dot dot-spin"><i></i><i></i><i></i><i></i></span>
      </div>    
    </div>
【版权声明】本文内容来自摩杜云社区用户原创、第三方投稿、转载,内容版权归原作者所有。本网站的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@moduyun.com

  1. 分享:
最后一次编辑于 2023年11月08日 0

暂无评论

iS8lx3oOvPxh