手机端H5加载中效果demo(整理)

简介: 手机端H5加载中效果demo(整理)

<!DOCTYPE html>
<html lang="zh">
  <head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>手机端H5加载中</title>
    <style>
      * {
        margin: 0;
        padding: 0;
      }
      /* --------- */
      @keyframes van-rotate {
        0% {
          -webkit-transform: rotate(0);
          transform: rotate(0)
        }
        to {
          -webkit-transform: rotate(1turn);
          transform: rotate(1turn)
        }
      }
      .vanLoading,
      .loadingSpan {
        position: relative;
        vertical-align: middle
      }
      .loadingSpan {
        display: inline-block;
        width: .8rem;
        max-width: 100%;
        height: .8rem;
        max-height: 100%;
        -webkit-animation: van-rotate .8s linear infinite;
        animation: van-rotate .8s linear infinite
      }
      .iBox {
        -webkit-animation-timing-function: steps(12);
        animation-timing-function: steps(12)
      }
      .iBox i {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%
      }
      .iBox i:before {
        display: block;
        width: .053333rem;
        height: 25%;
        margin: 0 auto;
        background-color: currentColor;
        border-radius: 40%;
        content: " "
      }
      @-webkit-keyframes van-circular {
        0% {
          stroke-dasharray: 1, 200;
          stroke-dashoffset: 0
        }
        50% {
          stroke-dasharray: 90, 150;
          stroke-dashoffset: -40
        }
        to {
          stroke-dasharray: 90, 150;
          stroke-dashoffset: -120
        }
      }
      @keyframes van-circular {
        0% {
          stroke-dasharray: 1, 200;
          stroke-dashoffset: 0
        }
        50% {
          stroke-dasharray: 90, 150;
          stroke-dashoffset: -40
        }
        to {
          stroke-dasharray: 90, 150;
          stroke-dashoffset: -120
        }
      }
      .iBox i:first-of-type {
        -webkit-transform: rotate(30deg);
        transform: rotate(30deg);
        opacity: 1
      }
      .iBox i:nth-of-type(2) {
        -webkit-transform: rotate(60deg);
        transform: rotate(60deg);
        opacity: .9375
      }
      .iBox i:nth-of-type(3) {
        -webkit-transform: rotate(90deg);
        transform: rotate(90deg);
        opacity: .875
      }
      .iBox i:nth-of-type(4) {
        -webkit-transform: rotate(120deg);
        transform: rotate(120deg);
        opacity: .8125
      }
      .iBox i:nth-of-type(5) {
        -webkit-transform: rotate(150deg);
        transform: rotate(150deg);
        opacity: .75
      }
      .iBox i:nth-of-type(6) {
        -webkit-transform: rotate(180deg);
        transform: rotate(180deg);
        opacity: .6875
      }
      .iBox i:nth-of-type(7) {
        -webkit-transform: rotate(210deg);
        transform: rotate(210deg);
        opacity: .625
      }
      .iBox i:nth-of-type(8) {
        -webkit-transform: rotate(240deg);
        transform: rotate(240deg);
        opacity: .5625
      }
      .iBox i:nth-of-type(9) {
        -webkit-transform: rotate(270deg);
        transform: rotate(270deg);
        opacity: .5
      }
      .iBox i:nth-of-type(10) {
        -webkit-transform: rotate(300deg);
        transform: rotate(300deg);
        opacity: .4375
      }
      .iBox i:nth-of-type(11) {
        -webkit-transform: rotate(330deg);
        transform: rotate(330deg);
        opacity: .375
      }
      .iBox i:nth-of-type(12) {
        -webkit-transform: rotate(1turn);
        transform: rotate(1turn);
        opacity: .3125
      }
      .vanToast {
        position: fixed;
        top: 50%;
        left: 50%;
        display: -webkit-box;
        display: -webkit-flex;
        display: flex;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -webkit-flex-direction: column;
        flex-direction: column;
        -webkit-box-align: center;
        -webkit-align-items: center;
        align-items: center;
        -webkit-box-pack: center;
        -webkit-justify-content: center;
        justify-content: center;
        box-sizing: content-box;
        width: 2.346667rem;
        max-width: 70%;
        min-height: 2.346667rem;
        padding: .426667rem;
        color: #fff;
        font-size: .373333rem;
        line-height: .533333rem;
        white-space: pre-wrap;
        text-align: center;
        word-break: break-all;
        background-color: rgba(0, 0, 0, .7);
        border-radius: .213333rem;
        -webkit-transform: translate3d(-50%, -50%, 0);
        transform: translate3d(-50%, -50%, 0)
      }
    </style>
    <script>
      var kk = document.documentElement.clientWidth;
      if (kk > 750) {
        kk = 750
      }
      document.documentElement.style.fontSize = kk / 7.5 + "px"
    </script>
  </head>
  <body>
    <div class="vanToast" style="z-index: 2001;">
      <div class="vanLoading"><span
          class="loadingSpan iBox"><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i></span>
      </div>
      <div class="toastTxt">加载中...</div>
    </div>
  </body>
</html>
相关文章
|
1月前
|
移动开发 JavaScript
H5唤起手机打电话(拨号)和发短信功能
H5唤起手机打电话(拨号)和发短信功能
50 0
|
5月前
|
移动开发 小程序 Android开发
|
7月前
|
移动开发
H5手机端常见问题汇总
H5手机端常见问题汇总
|
7月前
|
移动开发
手机h5页面唤起打电话、发短信功能
手机h5页面唤起打电话、发短信功能
|
8月前
|
移动开发
关于Uniapp开发h5怎么直接在手机上看到效果,不需要模拟器和发布。
关于Uniapp开发h5怎么直接在手机上看到效果,不需要模拟器和发布。
168 0
|
9月前
|
移动开发 定位技术 API
手机端H5地图调起开发实战案例解析(百度高德腾讯地图调起、底部弹出层、提示安装地图导航APP)
手机端H5地图调起开发实战案例解析(百度高德腾讯地图调起、底部弹出层、提示安装地图导航APP)
273 0
|
9月前
|
移动开发 定位技术
百度地图H5手机端自动定位并更换图标的解决方案
百度地图H5手机端自动定位并更换图标的解决方案
123 0
|
11月前
|
Web App开发 移动开发 Android开发
h5在手机浏览器显示正常,在iOS app内显示空白问题排查方法
h5在手机浏览器显示正常,在iOS app内显示空白问题排查方法
360 0
|
移动开发 JavaScript 网络安全
在手机中运行H5项目
在手机中运行H5项目
143 0

热门文章

最新文章