js+css实现流动的可交互流程图动画代码

代码语言:html

所属分类:图表

代码描述:js+css实现流动的可交互流程图动画代码,按回车开始,每一步都在流动,需要你按y或n来决策。

代码标签: j css 流动 交互 流程图 动画 代码

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

<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>PIPELINE — 可流动的流程图</title>
    <style>
        /* ---------- Base ---------- */
        :root {
            --bg: #0b0e14;
            --panel: #111622;
            --panel-2: #161c2b;
            --line: #252d40;
            --pipe: #2a3142;
            --pipe-dark: #0d1019;
            --liquid: #33e6ff;
            --liquid-2: #0aa7c9;
            --text: #dfe6f3;
            --muted: #8391ab;
            --accent: #ffb347;
            --danger: #ff5f7a;
            --ok: #4ef0a3;
            --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
            --sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0
        }

        html,
        body {
            height: 100%
        }

        body {
            font-family: var(--sans);
            background:
                radial-gradient(1200px 500px at 20% -10%, rgba(51, 230, 255, .08), transparent 60%),
                radial-gradient(900px 500px at 100% 100%, rgba(255, 179, 71, .06), transparent 60%),
                var(--bg);
            color: var(--text);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        /* ---------- Header ---------- */
        header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            padding: 14px 22px;
            border-bottom: 1px solid var(--line);
            background: linear-gradient(180deg, rgba(255, 255, 255, .02), transparent);
            flex-wrap: wrap;
        }

        .brand {
            display: flex;
            align-items: center;
            gap: 14px
        }

        .brand .logo {
            width: 44px;
            height: 44px;
            border-radius: 12px;
            background: linear-gradient(135deg, var(--liquid), var(--liquid-2));
            display: grid;
            place-items: center;
            box-shadow: 0 0 30px rgba(51, 230, 255, .35), inset 0 -4px 10px rgba(0, 0, 0, .3);
            font-size: 22px;
        }

        .brand h1 {
            font-size: 20px;
            letter-spacing: .14em;
            font-weight: 800
        }

        .brand p {
            font-size: 12px;
            color: var(--muted);
            margin-top: 2px
        }

        .controls {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap
        }

        .btn {
            font-family: var(--mono);
            font-size: 12px;
            letter-spacing: .08em;
            padding: 10px 16px;
            border-radius: 10px;
            cursor: pointer;
            border: 1px solid var(--line);
            background: var(--panel-2);
            color: var(--text);
            transition: transform .15s, box-shadow .15s, background .15s;
        }

        .btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 8px 20px rgba(0, 0, 0, .35)
        }

        .btn.primary {
            background: linear-gradient(135deg, var(--liquid), var(--liquid-2));
            color: #06232a;
            border-color: transparent;
            font-weight: 700;
            box-shadow: 0 0 24px rgba(51, 230, 255, .35);
        }

        .btn:disabled {
            opacity: .4;
            cursor: not-allowed;
            transform: none;
            box-shadow: none
        }

        .speed {
            display: flex;
            align-items: center;
            gap: 8px;
            font-family: var(--mono);
            font-size: 11px;
            color: var(--muted)
        }

        .speed input {
            accent-color: var(--liquid);
            width: 110px
        }

        /* ---------- Layout ---------- */
        main {
            flex: 1;
            display: grid;
            grid-template-columns: 280px 1fr;
            min-height: 0
        }

        aside {
            border-right: 1px solid var(--line);
            background: var(--panel);
            display: flex;
            flex-direction: column;
            min-.........完整代码请登录后点击上方下载按钮下载查看

网友评论0