深夜加班电脑特效

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>深夜加班电脑特效</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            background: #121212;
            font-family: Arial, sans-serif;
            overflow: hidden;
        }
        
        .scene {
            position: relative;
            width: 100%;
            height: 100vh;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }
        
        /* 房间 */
        .room {
            position: relative;
            width: 600px;
            height: 400px;
            background: #1a1a1a;
            border-radius: 10px;
            box-shadow: 0 0 50px rgba(0,0,0,0.8);
            overflow: hidden;
        }
        
        /* 桌子 */
        .desk {
            position: absolute;
            width: 100%;
            height: 80px;
            background: #2b2118;
            bottom: 0;
            border-top: 2px solid #3d2e1c;
        }
        
        /* 显示器 */
        .monitor {
            position: absolute;
            width: 300px;
            height: 180px;
            background: #333;
            top: 100px;
            left: 150px;
            border-radius: 5px 5px 0 0;
            box-shadow: 0 0 20px rgba(0,0,0,0.5);
        }
        
        .monitor-screen {
            position: absolute;
            width: 280px;
            height: 160px;
            background: #0a0a0a;
            top: 10px;
            left: 10px;
            overflow: hidden;
        }
        
        /* 代码文本效果 */
        .code {
            position: absolute;
            width: 100%;
            height: 100%;
            color: #0f0;
            font-family: 'Courier New', monospace;
            font-size: 12px;
            line-height: 1.5;
            padding: 10px;
            box-sizing: border-box;
            overflow: hidden;
        }
        
        .code-line {
            animation: typing 3s steps(40) infinite;
            white-space: nowrap;
            overflow: hidden;
        }
        
        .cursor {
            display: inline-block;
            width: 10px;
            height: 15px;
            background: #0f0;
            animation: blink 1s infinite;
            vertical-align: middle;
        }
        
        @keyframes typing {
            from { width: 0 }
            to { width: 100% }
        }
        
        @keyframes blink {
            0%, 100% { opacity: 1 }
            50% { opacity: 0 }
        }
        
        /* 显示器底座 */
        .monitor-stand {
            position: absolute;
            width: 100px;
            height: 20px;
            background: #444;
            top: 280px;
            left: 250px;
        }
        
        .monitor-base {
            position: absolute;
            width: 150px;
            height: 10px;
            background: #555;
            top: 300px;
            left: 225px;
            border-radius: 0 0 5px 5px;
        }
        
        /* 键盘 */
        .keyboard {
            position: absolute;
            width: 250px;
            height: 20px;
            background: #222;
            bottom: 90px;
            left: 175px;
            border-radius: 3px;
        }
        
        /* 咖啡杯 */
        .coffee-cup {
            position: absolute;
            width: 40px;
            height: 50px;
            background: #6f4e37;
            bottom: 90px;
            right: 100px;
            border-radius: 0 0 20px 20px;
        }
        
        .coffee {
            position: absolute;
            width: 36px;
            height: 10px;
            background: #4b3621;
            top: 5px;
            left: 2px;
            border-radius: 50%;
            animation: coffee-steam 3s infinite;
        }
        
        /* 咖啡热气 */
        .steam {
            position: absolute;
            width: 8px;
            height: 20px;
            background: rgba(255,255,255,0.3);
            border-radius: 50%;
            animation: steam-rise 4s infinite;
        }
        
        .steam:nth-child(1) {
            left: 8px;
            top: -15px;
            animation-delay: 0.5s;
        }
        
        .steam:nth-child(2) {
            left: 18px;
            top: -20px;
            animation-delay: 1s;
        }
        
        .steam:nth-child(3) {
            left: 28px;
            top: -15px;
            animation-delay: 1.5s;
        }
        
        @keyframes steam-rise {
            0% {
                transform: translateY(0) scale(1);
                opacity: 0;
            }
            50% {
                opacity: 0.5;
            }
            100% {
                transform: translateY(-30px) scale(1.5);
                opacity: 0;
            }
        }
        
        /* 窗外月光 */
        .moonlight {
            position: absolute;
            width: 200px;
            height: 200px;
            background: rgba(255,255,255,0.05);
            border-radius: 50%;
            top: -100px;
            right: -100px;
            box-shadow: 0 0 100px rgba(255,255,255,0.1);
        }
        
        /* 时钟 */
        .clock {
            position: absolute;
            width: 50px;
            height: 50px;
            background: #333;
            border-radius: 50%;
            top: 50px;
            right: 50px;
            border: 2px solid #444;
        }
        
        .clock-center {
            position: absolute;
            width: 5px;
            height: 5px;
            background: #fff;
            border-radius: 50%;
            top: 22.5px;
            left: 22.5px;
        }
        
        .clock-hour {
            position: absolute;
            width: 3px;
            height: 15px;
            background: #fff;
            top: 10px;
            left: 23.5px;
            transform-origin: bottom center;
            animation: hour-rotate 30s linear infinite;
        }
        
        .clock-minute {
            position: absolute;
            width: 2px;
            height: 20px;
            background: #fff;
            top: 5px;
            left: 24px;
            transform-origin: bottom center;
            animation: minute-rotate 5s linear infinite;
        }
        
        @keyframes hour-rotate {
            from { transform: rotate(0deg) }
            to { transform: rotate(360deg) }
        }
        
        @keyframes minute-rotate {
            from { transform: rotate(0deg) }
            to { transform: rotate(360deg) }
        }
        
        /* 底部链接 */
        .footer-link {
            position: fixed;
            bottom: 20px;
            color: rgba(255,255,255,0.5);
            text-decoration: none;
            font-size: 14px;
            transition: color 0.3s;
        }
        
        .footer-link:hover {
            color: #0f0;
            text-decoration: underline;
        }
    </style>
</head>
<body>
    <div class="scene">
        <div class="room">
            <div class="moonlight"></div>
            
            <div class="desk"></div>
            
            <div class="monitor">
                <div class="monitor-screen">
                    <div class="code">
                        <div class="code-line">while (deadline > now) {</div>
                        <div class="code-line">  code();</div>
                        <div class="code-line">  drinkCoffee();</div>
                        <div class="code-line">  if (bugs > 0) {</div>
                        <div class="code-line">    debug();</div>
                        <div class="code-line">  }</div>
                        <div class="code-line">}<span class="cursor"></span></div>
                    </div>
                </div>
            </div>
            
            <div class="monitor-stand"></div>
            <div class="monitor-base"></div>
            
            <div class="keyboard"></div>
            
            <div class="coffee-cup">
                <div class="coffee"></div>
                <div class="steam"></div>
                <div class="steam"></div>
                <div class="steam"></div>
            </div>
            
            <div class="clock">
                <div class="clock-hour"></div>
                <div class="clock-minute"></div>
                <div class="clock-center"></div>
            </div>
        </div>
        

    </div>
</body>
</html>

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值