js实现图形补全滑块拖动前端人机验证插件代码

代码语言:html

所属分类:验证

代码描述:js实现图形补全滑块拖动前端人机验证插件代码

代码标签: js 图形 补全 滑块 拖动 前端 验证 人机 插件 代码

下面为部分代码预览,完整代码请点击下载或在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>彩色立方体滑块验证 - DeepSeek风格</title>
    <style>
        :root {
            --primary: #4f6ef7;
            --primary-dark: #3a54d4;
            --success: #10b981;
            --error: #ef4444;
            --bg: #0a0a1a;
            --card-bg: rgba(255, 255, 255, 0.06);
            --card-border: rgba(255, 255, 255, 0.12);
            --text: #e8e8f0;
            --text-secondary: #a0a0b8;
            --slider-bg: rgba(255, 255, 255, 0.08);
            --slider-active: rgba(79, 110, 247, 0.35);
            --shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
            --radius: 16px;
            --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

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

        body {
            font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
            background: var(--bg);
            color: var(--text);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            position: relative;
            -webkit-user-select: none;
            user-select: none;
            -webkit-tap-highlight-color: transparent;
        }

        /* ==================== 背景光晕 ==================== */
        .bg-glow {
            position: fixed;
            top: 50%;
            left: 50%;
            width: 80vw;
            height: 80vw;
            max-width: 900px;
            max-height: 900px;
            background: radial-gradient(circle at 30% 30%, rgba(79, 110, 247, 0.15), transparent 60%),
                radial-gradient(circle at 70% 60%, rgba(168, 85, 247, 0.12), transparent 55%),
                radial-gradient(circle at 50% 80%, rgba(16, 185, 129, 0.08), transparent 50%);
            border-radius: 50%;
            transform: translate(-50%, -50%);
            pointer-events: none;
            z-index: 0;
            animation: glowPulse 8s ease-in-out infinite alternate;
        }

        @keyframes glowPulse {
            0% {
                opacity: 0.7;
                transform: translate(-50%, -50%) scale(1);
            }
            100% {
                opacity: 1;
                transform: translate(-50%, -50%) scale(1.15);
            }
        }

        /* ==================== 3D立方体容器 ==================== */
        .cubes-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 1;
            perspective: 1200px;
        }

        .cube-wrapper {
            position: absolute;
            transform-style: preserve-3d;
            animation: cubeFloat 8s ease-in-out infinite alternate;
        }

        .cube-wrapper:nth-child(1) {
            top: 8%;
            left: 5%;
            --cube-size: 70px;
            animation-delay: 0s;
            animation-duration: 7s;
            opacity: 0.7;
        }
        .cube-wrapper:nth-child(2) {
            top: 15%;
            right: 8%;
            --cube-size: 55px;
            animation-delay: -1.5s;
            animation-duration: 9s;
            opacity: 0.6;
        }
        .cube-wrapper:nth-child(3) {
            bottom: 20%;
            left: 12%;
            --cube-size: 90px;
            animation-delay: -3s;
            animation-duration: 10s;
            opacity: 0.55;
        }
        .cube-wrapper:nth-child(4) {
            bottom: 10%;
            right: 15%;
            --cube-size: 60px;
            animation-delay: -4.5s;
            animation-duration: 8s;
            opacity: 0.65;
        }
        .cube-wrapper:nth-child(5) {
            top: 50%;
            left: 3%;
            --cube-size: 45px;
            animation-delay: -2s;
            animation-duration: 6.5s;
            opacity: 0.5;
        }
        .cube-wrapper:nth-child(6) {
            top: 40%;
            right: 4%;
            --cube-size: 80px;
            animation-delay: -5s;
            animation-duration: 11s;
            opacity: 0.5;
        }
        .cube-wrapper:nth-child(7) {
            top: 5%;
            left: 40%;
            --cube-size: 40px;
            animation-delay: -3.5s;
            animation-duration: 7.5s;
            opacity: 0.45;
        }
        .cube-wrapper:nth-child(8) {
            bottom: 5%;
            left: 50%;
            --cube-size: 65px;
            animation-delay: -6s;
            animation-duration: 9.5s;
            opacity: 0.55;
        }
        .cube-wrapper:nth-child(9) {
            top: 30%;
            left: 25%;
            --cube-size: 35px;
            animation-delay: -2.5s;
            animation-duration: 6s;
            opacity: 0.4;
        }
        .cube-wrapper:nth-child(10) {
            bottom: 35%;
            right: 30%;
            --cube-size: 50px;
            animation-delay: -4s;
            animation-duration: 8.5s;
            opacity: 0.5;
        }
        .cube-wrapper:nth-child(11) {
            top: 70%;
            left: 70%;
            --cube-size: 42px;
            animation-delay: -1s;
            animation-duration: 7.2s;
            opacity: 0.45;
        }
        .cube-wrapper:nth-child(12) {
            top: 10%;
            right: 35%;
            --cube-size: 30px;
            animation-delay: -5.5s;
            animation-duration: 6.8s;
            opacity: 0.4;
        }

        @keyframes cubeFloat {
            0% {
                transform: translateY(0) rotateX(0deg) rotateY(0deg);
            }
            25% {
                transform: translateY(-25px) rotateX(45deg) rotateY(60deg);
            }
            50% {
                transform: tr.........完整代码请登录后点击上方下载按钮下载查看

网友评论0