点击查看html编辑器说明文档

可爱的Loading动画,文字翻倒edit icon

|
|
Fork(复制)
|
|
作者:
lynn-ssk
提交反馈
嵌入
设置
下载
HTML
格式化
支持Emmet,输入 p 后按 Tab键试试吧!
<head> ...
展开
</head>
<body>
            
            <link href="https://fonts.googleapis.com/css2?family=Modak&display=swap" rel="stylesheet">

<h1>
  <span>L</span>
  <span>O</span>
  <span>A</span>
  <span>D</span>
  <span>I</span>
  <span>N</span>
  <span>G</span>
</h1>

        
</body>
SCSS
格式化
            
            * {
    box-sizing: border-box;
}

body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Modak", cursive;
    overflow: hidden;
}

h1 {
    text-align: center;
    font-size: unquote("clamp(3.125rem, -3.125rem + 25vw, 15.625rem)");
    letter-spacing: -0.13em;

    span {
        color: #0390f6;
        text-shadow: 4px 4px 0px #82f2f2, 8px 8px 0px #6d63fd;
        animation: knock 3s infinite;
        position: relative;
        display: inline-block;
        font-weight: 300;

        &:nth-of-type(2) {
            animation-delay: 0.25s;
        }

        &:nth-of-type(3) {
            animation-delay: 0.45s;
        }

        &:nth-of-type(4) {
            animation-delay: 0.65s;
        }

        &:nth-of-type(5) {
            animation-delay: 850ms;
        }

        &:nth-of-type(6) {
            animation-delay: 1050ms;
        }

        &:nth-of-type(7) {
            animation-delay: 1250ms;
        }
    }
}

@keyframes knock {
    0% {
        transform: rotate(0) translatey(0);
    }

    25% {
        transform: rotate(90deg) translatey(-.15em);
    }

    50% {
        transform: rotate(360eg) translatey(-.15em);
    }

    55% {
        transform: rotate(0) translatey(0);
    }

    100% {
        transform: rotate(0) translatey(0);
    }
}
        
JS
格式化
            
            
        
预览
控制台