<!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;
font-family: Arial, sans-serif;
background-color: #000;
color: #0f0;
overflow: hidden;
}
#warning {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
z-index: 100;
background-color: rgba(0, 0, 0, 0.8);
padding: 20px;
border: 2px solid red;
border-radius: 10px;
max-width: 80%;
}
#warning h1 {
color: red;
}
#warning button {
background-color: #0f0;
color: black;
border: none;
padding: 10px 20px;
font-size: 16px;
cursor: pointer;
margin-top: 20px;
border-radius: 5px;
}
.error {
position: absolute;
color: #f00;
font-size: 24px;
animation: float 5s linear infinite;
}
@keyframes float {
0% { transform: translateY(0) translateX(0); opacity: 0; }
10% { opacity: 1; }
90% { opacity: 1; }
100% { transform: translateY(-100vh) translateX(20vw); opacity: 0; }
}
.matrix {
position: absolute;
color: #0f0;
font-family: monospace;
animation: fall linear infinite;
}
@keyframes fall {
to { transform: translateY(100vh); }
}
</style>
</head>
<body>
<div id="warning">
<h1>⚠️ 警告 ⚠️</h1>
<p>检测到您的系统已被感染!</p>
</div>
<script>
// 创建错误消息
function createErrors() {
const messages = [
"错误: 系统崩溃",
"致命错误",
"访问被拒绝",
"内存不足",
"病毒检测",
"文件损坏",
"系统入侵",
"数据丢失",
"磁盘错误",
"无法修复"
];
for (let i = 0; i < 20; i++) {
setTimeout(() => {
const error = document.createElement('div');
error.className = 'error';
error.textContent = messages[Math.floor(Math.random() * messages.length)];
error.style.left = Math.random() * 100 + 'vw';
error.style.top = Math.random() * 100 + 'vh';
error.style.animationDuration = (3 + Math.random() * 7) + 's';
document.body.appendChild(error);
// 移除元素以保持DOM清洁
setTimeout(() => {
error.remove();
}, 10000);
}, i * 300);
}
}
// 创建矩阵雨效果
function createMatrixRain() {
const chars = "01アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲン";
for (let i = 0; i < 50; i++) {
setTimeout(() => {
const column = document.createElement('div');
column.className = 'matrix';
column.style.left = Math.random() * 100 + 'vw';
column.style.animationDuration = (2 + Math.random() * 8) + 's';
// 创建多个字符
for (let j = 0; j < 30; j++) {
const char = document.createElement('div');
char.textContent = chars[Math.floor(Math.random() * chars.length)];
char.style.opacity = 0.1 + Math.random() * 0.9;
column.appendChild(char);
}
document.body.appendChild(column);
// 移除元素以保持DOM清洁
setTimeout(() => {
column.remove();
}, 20000);
}, i * 200);
}
}
// 停止所有效果
function stopVirus() {
document.body.innerHTML = `
<div style="display: flex; justify-content: center; align-items: center; height: 100vh; flex-direction: column;">
<h1 style="color: #0f0;">模拟已停止</h1>
<p>您的设备从未处于危险中</p>
<p>这只是一个视觉效果演示</p>
<button onclick="location.reload()" style="margin-top: 20px; padding: 10px 20px; background: #0f0; color: black; border: none; border-radius: 5px; cursor: pointer;">
重新开始模拟
</button>
</div>
`;
}
// 启动效果
function startVirus() {
createErrors();
createMatrixRain();
// 持续创建新效果
setInterval(createErrors, 5000);
setInterval(createMatrixRain, 3000);
}
// 页面加载后开始
window.onload = startVirus;
</script>
</body>
</html>
1万+

被折叠的 条评论
为什么被折叠?



