带粒子背景与打字机效果的极客留言板代码

深色模式 + 动态粒子背景 + 打字机效果。这种风格极具现代感,适合开发者社区或个人极客博客。由于Canvas动画无法直接预览,下方代码包含完整的JS逻辑。
点击查看完整HTML/JS代码(含粒子背景)
<!DOCTYPE html>
<html>
<head>
<style>
body { margin: 0; overflow: hidden; background: #1e1e2e; font-family: 'Consolas', monospace; }
canvas { position: fixed; top: 0; left: 0; z-index: 0; }
.container { position: relative; z-index: 1; width: 100%; height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.terminal { width: 500px; background: rgba(30, 30, 46, 0.9); border: 1px solid #00d2ff; padding: 20px; border-radius: 5px; box-shadow: 0 0 20px rgba(0, 210, 255, 0.2); backdrop-filter: blur(5px); }
.output { height: 150px; overflow-y: auto; color: #a0a0a0; margin-bottom: 10px; font-size: 14px; }
.output div { margin-bottom: 5px; }
.input-group { display: flex; gap: 10px; }
input { flex: 1; background: transparent; border: none; border-bottom: 2px solid #00d2ff; color: #fff; padding: 8px; outline: none; font-family: inherit; font-size: 16px; }
button { background: #00d2ff; color: #1e1e2e; border: none; padding: 8px 20px; font-weight: bold; cursor: pointer; transition: 0.3s; }
button:hover { background: #fff; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-thumb { background: #00d2ff; }
</style>
</head>
<body>
<canvas id="bgCanvas"></canvas>
<div class="container">
<div class="terminal">
<div class="output" id="output"></div>
<div class="input-group">
<input type="text" id="msg" placeholder="输入留言并回车..." onkeydown="if(event.keyCode==13) sendMessage()">
<button onclick="sendMessage()">SEND</button>
</div>
</div>
</div>
<script>
// 粒子背景逻辑
const canvas = document.getElementById('bgCanvas');
const ctx = canvas.getContext('2d');
let width, height;
let particles = [];
function resize() { width = canvas.width = window.innerWidth; height = canvas.height = window.innerHeight; }
window.onresize = resize; resize();
class Particle {
constructor() {
this.x = Math.random() * width;
this.y = Math.random() * height;
this.vx = (Math.random() - 0.5) * 0.5;
this.vy = (Math.random() - 0.5) * 0.5;
this.size = Math.random() * 2;
}
update() {
this.x += this.vx; this.y += this.vy;
if (this.x width) this.vx *= -1;
if (this.y height) this.vy *= -1;
}
draw() {
ctx.fillStyle = 'rgba(0, 210, 255, 0.5)';
ctx.beginPath(); ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2); ctx.fill();
}
}
for (let i = 0; i { p.update(); p.draw(); });
// 连线
for (let i = 0; i {
const reply = document.createElement('div');
reply.style.color = '#ff0055';
reply.innerHTML = `> [SYSTEM]: Message received. Stored in sector 7G.`;
output.appendChild(reply);
output.scrollTop = output.scrollHeight;
}, 600);
input.value = '';
output.scrollTop = output.scrollHeight;
}
</script>
</body>
</html>
-
赤色月光:106.89.170.234補記仲係讀書時候睇嘅經典之作烚下烚下
-
环游发光睡裤:139.202.120.180这季尾收的太工整带粒子背景与打字机效果的极客留言板代码没有弄大事件真好奇第6季怎么开头
-
Phoebe的情书:121.76.190.87这种片子得是阅碟颇多的人才能看懂 搞笑啊 哈哈
-
惟勤Heart:222.83.163.64拍得很好看浓墨重彩的表现风格 疤面煞星不知道是不是从这片来的灵感写一个人如何走向灵魂的深渊 最好的故事感觉没有讲完带粒子背景与打字机效果的极客留言板代码可能是觉得无论是谁杀死谁都不够高级吧 我倒是喜欢他不被杀死一个不死的恶魂就很带劲
-
捕雨:36.58.144.126董永太太太丑了 杨子好好的商人干嘛非要出来演戏辣眼睛 他俩算是公费谈恋爱黄圣依好美啊
🆕 New
- 如何用AI绘画生成高质量黑白吸烟男插画
- 黑白吸烟男头像寓意与社交形象分析
- 黑白吸烟男图片摄影技巧与构图指南
- 手机修图APP推荐:一键生成欧美清冷感滤镜
- 2024年流行趋势:复古美式与Clean Fit风格解析
- 欧美男小清新插画与AI绘画关键词指南
- 男生小清新自拍姿势与穿搭风格教程
- 如何寻找高质量的欧美男小清新图片素材(无版权指南)
- 欧美男小清新摄影风格特点与构图技巧
- 关于“重口味”纹身的审美与社会接受度探讨
- 重口味纹身的保养与恢复指南
- 如何与纹身师沟通设计“重口味”图案
- 黑白吸烟男图片后期处理与滤镜教程
- 关于“吸烟男黑白图”的版权与商用风险说明
- 森系小清新男头像推荐
- 森系男生穿搭风格解析
- 森系小清新摄影技巧与滤镜参数
- 适合森系风格的拍照姿势与道具
- 寻找森系素材的网站与平台推荐
- 森系男vs盐系男:风格区别与辨识
- 社会图片吧最火的男性头像风格有哪些
- 如何在百度贴吧社会图片吧高效寻找高清男头
- 社会图片吧男头为什么受年轻人欢迎
- 社会图片吧男头与非主流/杀马特头像的区别



















