css实现一个炫酷动画loading(四)

在这里插入图片描述
html

  <div class="🤚">
        <div class="👉"></div>
        <div class="👉"></div>
        <div class="👉"></div>
        <div class="👉"></div>
        <div class="🌴"></div>
        <div class="👍"></div>
    </div>

css

<style>
    body {
        background-color: #000;
    }

    .🤚 {
        margin: 500px;
        --skin-color: #E4C560;
        --tap-speed: 0.6s;
        --tap-stagger: 0.1s;
        position: relative;
        width: 80px;
        height: 60px;
        margin-left: 580px;
    }

    .🤚:before {
        content: '';
        display: block;
        width: 180%;
        height: 75%;
        position: absolute;
        top: 70%;
        right: 20%;
        background-color: black;
        border-radius: 40px 10px;
        filter: blur(10px);
        opacity: 0.3;
    }

    .🌴 {
        display: block;
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        background-color: var(--skin-color);
        border-radius: 10px 40px;
    }

    .👍 {
        position: absolute;
        width: 120%;
        height: 38px;
        background-color: var(--skin-color);
        bottom: -18%;
        right: 1%;
        transform-origin: calc(100% - 20px) 20px;
        transform: rotate(-20deg);
        border-radius: 30px 20px 20px 10px;
        border-bottom: 2px solid rgba(0, 0, 0, 0.1);
        border-left: 2px solid rgba(0, 0, 0, 0.1);
    }

    .👍:after {
        width: 20%;
        height: 60%;
        content: '';
        background-color: rgba(255, 255, 255, 0.3);
        position: absolute;
        bottom: -8%;
        left: 5px;
        border-radius: 60% 10% 10% 30%;
        border-right: 2px solid rgba(0, 0, 0, 0.05);
    }

    .👉 {
        position: absolute;
        width: 80%;
        height: 35px;
        background-color: var(--skin-color);
        bottom: 32%;
        right: 64%;
        transform-origin: 100% 20px;
        animation-duration: calc(var(--tap-speed) * 2);
        animation-timing-function: ease-in-out;
        animation-iteration-count: infinite;
        transform: rotate(10deg);
    }

    .👉:before {
        content: '';
        position: absolute;
        width: 140%;
        height: 30px;
        background-color: var(--skin-color);
        bottom: 8%;
        right: 65%;
        transform-origin: calc(100% - 20px) 20px;
        transform: rotate(-60deg);
        border-radius: 20px;
    }

    .👉:nth-child(1) {
        animation-delay: 0;
        filter: brightness(70%);
        animation-name: tap-upper-1;
    }

    .👉:nth-child(2) {
        animation-delay: var(--tap-stagger);
        filter: brightness(80%);
        animation-name: tap-upper-2;
    }

    .👉:nth-child(3) {
        animation-delay: calc(var(--tap-stagger) * 2);
        filter: brightness(90%);
        animation-name: tap-upper-3;
    }

    .👉:nth-child(4) {
        animation-delay: calc(var(--tap-stagger) * 3);
        filter: brightness(100%);
        animation-name: tap-upper-4;
    }

    @keyframes tap-upper-1 {

        0%,
        50%,
        100% {
            transform: rotate(10deg) scale(0.4);
        }

        40% {
            transform: rotate(50deg) scale(0.4);
        }
    }

    @keyframes tap-upper-2 {

        0%,
        50%,
        100% {
            transform: rotate(10deg) scale(0.6);
        }

        40% {
            transform: rotate(50deg) scale(0.6);
        }
    }

    @keyframes tap-upper-3 {

        0%,
        50%,
        100% {
            transform: rotate(10deg) scale(0.8);
        }

        40% {
            transform: rotate(50deg) scale(0.8);
        }
    }

    @keyframes tap-upper-4 {

        0%,
        50%,
        100% {
            transform: rotate(10deg) scale(1);
        }

        40% {
            transform: rotate(50deg) scale(1);
        }
    }
</style>

相关推荐

最近更新

  1. TCP协议是安全的吗?

    2024-06-05 23:56:06       16 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-06-05 23:56:06       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-06-05 23:56:06       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-06-05 23:56:06       18 阅读

热门阅读

  1. React@16.x(19)事件的处理

    2024-06-05 23:56:06       11 阅读
  2. Mysql详解

    2024-06-05 23:56:06       10 阅读
  3. Docker修改数据目录

    2024-06-05 23:56:06       7 阅读
  4. python连接数据库

    2024-06-05 23:56:06       8 阅读
  5. 深度解析Go语言中的Slice切片

    2024-06-05 23:56:06       7 阅读
  6. 使用 Docker 和 Docker Compose 部署 Vue

    2024-06-05 23:56:06       8 阅读
  7. 机房网络运维服务项目难点与关键点分析

    2024-06-05 23:56:06       8 阅读
  8. .NET Core NPOI导出Word,浏览器下载

    2024-06-05 23:56:06       10 阅读