css-doodle实现舞动青春特效

代码语言:html

所属分类:动画

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">

    <title> Dance (Chrome only)</title>
    <style>
        html, body {
            width: 100%;
            height: 100%;
            margin: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #011627;
            overflow: hidden;
        }
    </style>

</head>
<body translate="no">
    <style>
        css-doodle {
            --rule: (: doodle {
            @grid: 1x1x100 / 100vmin;
            will-change: transform;
            animation: r23slinear infinite;
        }

@size: 100% 50%;
        position: absolute; top: 25%;
        transform: rotate(@r(360deg));
        perspective: @r(100px, 200px);

:after {
            content: '';
            position: absolute;
            @size: @r(.5vmin, 5vmin);
            color: @p(#FDFFFC, #2EC4B6, #E71D36, #FF9F1C);
            background: currentColor;
            box-shadow: .........完整代码请登录后点击上方下载按钮下载查看

网友评论0