样式style

<style>
      .first-loading-wrp {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 90vh;
        min-height: 90vh;
      }

      .first-loading-wrp > h1 {
        font-size: 30px;
        font-weight: bolder;
      }

      @keyframes loading__scale-to-up{
        from {
          transform: scale(1, 0.2);
        }
        to {
          transform: scale(1, 1);
        }
      }

      .first-loading-wrp .loading-wrp i{
        background-color: #409eff;
        display: inline-block;
        width: 5px;
        height: 50px;
        border-radius: 5px;
      }
      .splash__item + .splash__item {
        margin-left: 10px;
      }

      .first-loading-wrp .loading-wrp .splash__item {
        animation: loading__scale-to-up 0.5s linear infinite alternate-reverse;
        animation-delay: calc(var(--i) + 0s);
      }
    </style>

html代码

<div class="first-loading-wrp">
        <div class="loading-wrp">
            <i class="splash__item" style="--i: .1s"></i>
            <i class="splash__item" style="--i: .2s"></i>
            <i class="splash__item" style="--i: .3s"></i>
            <i class="splash__item" style="--i: .4s"></i>
            <i class="splash__item" style="--i: .5s"></i>
            <i class="splash__item" style="--i: .6s"></i>
            <i class="splash__item" style="--i: .7s"></i>
            <i class="splash__item" style="--i: .8s"></i>
        </div>
        <h1>加载中...</h1>
      </div>

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐