这是一份可直接运行的 HTML/CSS/JS 交互工具页面,四通道色彩空间切换 + 滤镜叠加,画面区域会实时预览,方便你对照不同组合效果。
<!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> * { box-sizing: border-box; margin: 0; padding: 0; } body { background: #1b1e26; color: #e8ecf2; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif; display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; } .app { width: 100%; max-width: 980px; background: #232733; border-radius: 16px; padding: 24px 26px 28px; box-shadow: 0 18px 48px rgba(0,0,0,.45); } h1 { font-size: 20px; font-weight: 600; letter-spacing: .5px; margin-bottom: 4px; } .sub { font-size: 13px; color: #9aa4b8; margin-bottom: 18px; } /* 模式按钮 */ .modes { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; } .mode-btn { flex: 1 1 0; min-width: 120px; padding: 10px 12px; background: #2e3343; border: 1px solid #3c4356; border-radius: 10px; color: #b9c2d4; font-size: 14px; cursor: pointer; transition: .18s; user-select: none; } .mode-btn:hover { background: #373d50; color: #e8ecf2; } .mode-btn.active { background: #3f7cff; border-color: #3f7cff; color: #fff; box-shadow: 0 4px 14px rgba(63,124,255,.4); } /* 舞台 */ .stage { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #11141b; margin-bottom: 18px; } .scene { position: absolute; inset: 0; transition: filter .25s ease; } /* 场景:一个渐变天空 + 地面 + 圆形物体 */ .sky { position: absolute; inset: 0; background: linear-gradient(180deg, #6fb1ff 0%, #a6d4ff 55%, #d9ecff 100%); } .ground { position: absolute; left: 0; right: 0; bottom: 0; height: 38%; background: linear-gradient(180deg, #4caf6d 0%, #2e7d4f 100%); } .sun { position: absolute; width: 16%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff6c4, #ffcf3d 55%, #ff9f1a 100%); top: 12%; left: 12%; box-shadow: 0 0 40px rgba(255,190,60,.65); } .ball { position: absolute; width: 22%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #ffffff, #ff5c8a 45%, #b3174f 100%); bottom: 12%; right: 14%; box-shadow: 0 14px 30px rgba(0,0,0,.35); } .box { position: absolute; width: 14%; aspect-ratio: 1; background: linear-gradient(135deg, #ffd166, #ef8b2c); border-radius: 10px; bottom: 30%; left: 32%; box-shadow: 0 10px 22px rgba(0,0,0,.3); } .caption { position: absolute; left: 12px; bottom: 10px; font-size: 12px; color: rgba(255,255,255,.85); background: rgba(0,0,0,.4); padding: 4px 10px; border-radius: 6px; backdrop-filter: blur(2px); } /* 滤镜控件 */ .filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; } .filter-card { background: #2a2f3d; border: 1px solid #3a4154; border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; } .filter-card .head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: #c4cddf; } .filter-card .head label { display: flex; align-items: center; gap: 6px; cursor: pointer; } .filter-card input[type="checkbox"] { width: 15px; height: 15px; accent-color: #3f7cff; cursor: pointer; } .filter-card input[type="range"] { width: 100%; accent-color: #3f7cff; cursor: pointer; } .val { font-size: 12px; color: #8f9ab2; font-variant-numeric: tabular-nums; } /* 色板 */ .swatches { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; } .swatch { flex: 1 1 0; min-width: 90px; border-radius: 10px; padding: 10px; text-align: center; font-size: 12px; font-weight: 600; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.45); transition: box-shadow .2s; } .swatch.red { background: #e74c3c; } .swatch.green { background: #27ae60; } .swatch.blue { background: #2f80ed; } .swatch.gray { background: #7f8c8d; } .hint { margin-top: 14px; font-size: 12px; color: #7b869c; line-height: 1.6; } code { background: #1a1e27; padding: 1px 6px; border-radius: 4px; font-size: 12px; color: #8ec5ff; } </style> </head> <body> <div class="app"> <h1>色彩空间四通道 · 切换演示</h1> <div class="sub">切换 RGB / HSV / HSL / LAB,叠加滤镜实时查看画面变化</div> <!-- 模式 --> <div class="modes" id="modes"> <button class="mode-btn active">WinForm控件开发进阶技巧与实战经验
1. WinForm开发基础与控件概述作为.NET桌面开发的主流技术栈,WinForm已经陪伴我们走过了二十余年的时光。虽然现在有WPF等新技术不断涌现,但WinForm凭借其成熟的控件体系、简单的API设计和高效的开发流程,仍然是企业级桌面应用开发的中坚力量…
LeNet-5:卷积神经网络经典架构解析与PyTorch实现
1. LeNet:卷积神经网络的奠基之作1998年,Yann LeCun团队在论文《Gradient-Based Learning Applied to Document Recognition》中首次提出了LeNet-5架构。这个看似简单的7层网络,如今被公认为现代卷积神经网络(CNN)的鼻…
IPOA-SVM时序预测模型:优化算法与支持向量机的结合应用
1. 项目概述:IPOA-SVM时序预测模型的核心价值时序预测一直是工业界和学术界共同关注的经典问题。在能源消耗预测、股票价格分析、设备故障预警等场景中,准确预测未来趋势往往意味着巨大的经济价值。传统统计方法如ARIMA在面对非线性、非平稳数据时表现乏…
Caveman:用Python写模板的极简静态站点生成器
在折腾过七八个静态站点生成器之后,我已经懒得再为一个博客维护一套Node生态或者一堆YAML配置了。Caveman是我目前最满意的一个——它是一个用Python写的极简静态站点生成器,核心思路简单到有点原始:模板直接用Python来写,内容用M…
t3code 指什么?解读 T3 Stack 全栈 TypeScript 类型安全实践
先解释一下这个标题。t3code 这个关键词,在技术圈里对应的并不是某个独立的新语言或者新框架,而是指以“T3 Stack”为核心的一整套全栈 TypeScript 技术栈组合。T3 Stack 这个名字来自 t3.gg 社区,核心三件套是 Next.js、tRPC、Tailwind CSS&…
西电基础实验操作手记:从接线到报告的实操指南
简介:本资源为西安电子科技大学基础实验课程配套答案详解,面向该校电子信息类专业本科生及备考相关实验考核的学习者,旨在解决实验预习、过程验证与报告撰写中的核心难点。压缩包内含1个669KB的Word文档,完整覆盖电路分析…