无害“病毒“HTML页面

<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>无害病毒模拟</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            background-color: black;
            color: lime;
            font-family: 'Courier New', monospace;
            overflow: hidden;
        }
        
        #virus-screen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 1000;
        }
        
        #message {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            text-align: center;
            font-size: 24px;
        }
        
        .matrix-char {
            position: absolute;
            color: lime;
            font-size: 16px;
            opacity: 0;
            animation: fall linear infinite;
        }
        
        @keyframes fall {
            to {
                top: 100%;
                opacity: 1;
            }
        }
        
        #countdown {
            font-size: 48px;
            margin: 20px 0;
        }
        
        #warning {
            color: red;
            font-weight: bold;
            animation: blink 0.5s infinite alternate;
        }
        
        @keyframes blink {
            from { opacity: 0.2; }
            to { opacity: 1; }
        }
        
        #final-message {
            display: none;
            margin-top: 30px;
        }
        
        button {
            background: lime;
            color: black;
            border: none;
            padding: 10px 20px;
            font-size: 18px;
            cursor: pointer;
            margin-top: 20px;
        }
    </style>
</head>
<body>
    <div id="virus-screen">
        <div id="message">
            <div id="warning">警告!检测到病毒入侵!</div>
            <div id="countdown">5</div>
            <div>您的系统正在被攻击...</div>
            <div id="final-message">
                哈哈,这只是个玩笑!<br>
                这个页面完全无害,不会对您的设备造成任何影响。<br>
                <button onclick="closeVirus()">关闭这个玩笑</button>
            </div>
        </div>
    </div>

    <script>
        // 创建矩阵雨效果
        function createMatrixRain() {
            const chars = "01アイウエオABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
            const screenWidth = window.innerWidth;
            const screenHeight = window.innerHeight;
            
            for (let i = 0; i < 100; i++) {
                setTimeout(() => {
                    const char = document.createElement('div');
                    char.className = 'matrix-char';
                    char.textContent = chars.charAt(Math.floor(Math.random() * chars.length));
                    char.style.left = Math.random() * screenWidth + 'px';
                    char.style.top = -20 + 'px';
                    char.style.animationDuration = (Math.random() * 3 + 2) + 's';
                    document.getElementById('virus-screen').appendChild(char);
                    
                    // 移除DOM元素以避免内存泄漏
                    setTimeout(() => {
                        char.remove();
                    }, 5000);
                }, Math.random() * 3000);
            }
        }
        
        // 倒计时效果
        function startCountdown() {
            let count = 5;
            const countdownElement = document.getElementById('countdown');
            const timer = setInterval(() => {
                count--;
                countdownElement.textContent = count;
                
                if (count <= 0) {
                    clearInterval(timer);
                    document.getElementById('final-message').style.display = 'block';
                    document.getElementById('warning').textContent = "只是个玩笑!";
                    document.getElementById('warning').style.animation = 'none';
                    document.getElementById('warning').style.color = 'lime';
                }
            }, 1000);
        }
        
        // 关闭病毒效果
        function closeVirus() {
            document.getElementById('virus-screen').style.display = 'none';
        }
        
        // 初始化
        window.onload = function() {
            createMatrixRain();
            startCountdown();
            
            // 持续创建矩阵雨效果
            setInterval(createMatrixRain, 2000);
        };
    </script>
</body>
</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值