three实现三维炫酷年会抽奖代码

代码语言:html

所属分类:其他

代码描述:three实现三维炫酷年会抽奖代码

代码标签: three 三维 炫酷 年会 抽奖 代码

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

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
    <title>3D 炫酷年会抽奖系统</title>
    <style>
        html, body {
            height: 100%;
            margin: 0;
            font-family: 'Segoe UI', sans-serif;
            background-color: #000;
            overflow: hidden;
        }

        /* 动态星空背景 */
        #bg-canvas {
            position: absolute;
            top: 0;
            left: 0;
            z-index: -1;
        }

        /* 3D 容器 */
        #container {
            width: 100%;
            height: 100%;
            position: absolute;
            top: 0;
            perspective: 1000px; /* 增加透视感 */
        }

        /* 单个名字卡片样式 */
        .element {
            width: 120px;
            height: 160px;
            box-shadow: 0px 0px 12px rgba(0, 255, 255, 0.5);
            border: 1px solid rgba(127, 255, 255, 0.25);
            background-color: rgba(0, 127, 127, 0.3);
            text-align: center;
            cursor: default;
            transition: background-color 0.3s, box-shadow 0.3s;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            user-select: none;
        }

        .element:hover {
            box-shadow: 0px 0px 20px rgba(0, 255, 255, 0.75);
            border: 1px solid rgba(127, 255, 255, 0.75);
        }

        .element .number {
            font-size: 14px;
            color: rgba(127, 255, 255, 0.75);
            margin-bottom: 10px;
        }

        .element .name {
            font-size: 28px;
            font-weight: bold;
            color: rgba(255, 255, 255, 0.9);
            text-shadow: 0 0 10px rgba(0, 255, 255, 0.95);
        }

        /* 中奖高亮样式 */
        .element.winner {
            background-color: rgba(255, 215, 0, 0.7) !important;
            box-shadow: 0px 0px 30px rgba(255, 215, 0, 0.9) !important;
            border: 2px solid #fff !important;
            z-index: 999;
        }
        
        /* 底部形态控制栏 */
        #menu {
            position: absolute;
            bottom: 20px;
            width: 100%;
            text-align: center;
            z-index: 100;
        }

        button {
            color: rgba(127, 255, 255, 0.75);
            background: transparent;
            .........完整代码请登录后点击上方下载按钮下载查看

网友评论0