火焰效果

代码语言:html

所属分类:动画

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

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

    <title> - Variable Flames - Update</title>
    <style>
        body {
            background-color: black;
        }

        .firepit {
            position: relative;
            width: 100px;
            height: 100px;
            margin: 120px auto;

            transform-origin: center bottom;
            transform: scaleY(3);
        }

        .flame {
            position: absolute;
            bottom: 0px;
            border-radius: 8% 50% 50% 50%;

            transform: rotate(45deg);
        }

        .flameLayer {
            bottom: 0;
            position: absolute;

            /* animation description */
            animation-name: layerRandomize;
            animation-delay: 10ms;
            animation-duration: 200ms;
            animation-iteration-count: infinite;
            animation-timing-function: ease-in;
            animation-direction: alternate;
        }

        .red {
            width: 50px;
            height: 50px;
            background-color: rgba(255, 37, 19, 0.5);

            border: 0px;
            box-shadow: 0px 0px 5px 4px rgba(255, 37, 19, 0.5);

            /* animation description */
            animation-name: flickRed;
            animation-delay: 10ms;
            animation-duration: 500ms;
            animation-iteration-count: infinite;
            animation-timing-function: ease-in;
            animation-direction: alternate;
        }

        .orange {
            left: 5px;
            width: 40px;
            height: 40px;

            background-color: rgba(245, 96, 21, 0.6);
            box-shadow: 0px 0px 12px 6px rgba(245, 96, 21, 0.6);

            /* animation description */
            animation-name: flickOrange;
            animation-delay: 5ms;
            animation-duration: 1s;
            animation-iteration-count: infinite;
            animation-timing-function: ease-in;
            animation-direction: alternate;
        }

        .yellow {
            left: 10px;
            width: 30px;
            height: 30px;

            background-color: rgba(254, 182, 69, 0.6);
            box-shadow: 0px 0px 12px 6px rgba(254, 182, 69, 0.6);

            /* animation description */
            animation-name: flickYellow;
            animation-delay: 0ms;
            animation-duration: 405ms;
            animation-iteration-count: infinite;
            animation-timing-function: ease-in;
            animation-direction: alternate;
        }

        .white {
            left: 10px;
            bottom: -5px;
            width: 30px;
            height: 30px;

            background-color: rgba(255, 255, 255, 0.6);
            box-shadow: 0px 0px 9px 4px rgba(255, 255, 255, 1);

            /* animation description */
            animation-name: flickWhite;
            animation-delay: 0ms;
            animation-duration: 522ms;
            animation-iteration-count: infinite;
            animation-timing-function: ease-in;
            animation-direction: alternate;
        }

        .offset {
            position: absolute;
            left: 10px;
            bottom: -45px;
            width: 50px;
            height: 50px;

            border-radius: 50%;

            /* animation description */
            animation-name: flickOffset;
            animation-delay: 0ms;
            animation-duration: 1s;
            animation-iteration-count: infinite;
            animation-timing-function: ease-in;
            animation-direction: alternate;
        }

        .glow {
            /* TODO: Fix glow */
            left: -20px;
            bottom: -10px;
            width: 70px;
            height: 70px;
            background: radial-gradient(
            ellipse at center,
            rgba(255, 40, 20, 0.1) 0%,
            rgba(255, 40, 20, 0.05) 100%
            );
            opacity: 0.6;

            /* animation description */
            animation-name: flickGlow;
            animation-delay: 0ms;
            animation-duration: 1s;
            animation-iteration-count: infinite;
            animation-timing-function: ease-in;
            animation-direction: alternate;
        }

        .black {
            background-color: rgba(0, 0, 0, 1);
            box-shadow: 0px 0px 15px 10px rgba(0, 0, 0, 1);
        }

        .blue {
     .........完整代码请登录后点击上方下载按钮下载查看

网友评论0