🎲 Particle Effect Generator

Batch-produce runnable CSS particle effects: set the particle count, animation period and colour per scheme (leave blank for random); each scheme ships ready-to-paste HTML particles plus CSS with the animation already bound, and renders a live preview.

📐 工作原理与说明
生成条数钳制在 1–50(缺省 5);第 i 条按 i 对 4 取模循环选取 circle、square、diamond、star 四种形状(用 clip-path 实现,不与 transform 动画冲突);每套的粒子数 20–200、颜色、尺寸 2–10 px、周期 0.3–3.0 s、扩散半径 50–300 px、透明度 0.3–0.8 可指定或留空随机。输出为「HTML 粒子节点 + CSS」:.particles-N .p 绑定 animation: float-N var(--speed) linear infinite,--size / --color / --speed / --spread / --opacity 全部被引用,每个粒子另带 left、animation-delay 与 --dx。关键帧:0% 下移一个扩散半径、透明度 0;20% 升到设定透明度;100% 上移一个扩散半径并横向偏移 --dx、透明度回到 0
基于 CSS 关键帧的粒子系统:每个粒子是一个绝对定位的 span,靠 clip-path 决定形状、靠 CSS 变量与 keyframes 完成上浮与淡入淡出,不依赖 JavaScript 运行时;输出为可直接粘贴运行的 HTML + CSS 两段代码,并给出实时预览。用于网页背景与活动页特效。

📚 深度解析:粒子特效生成器(可配置参数)

💡 常见使用场景

  • 网页背景特效。
  • 活动页粒子。
  • 教学 canvas 动画。
生成上浮粒子

输入:粒子 80、速度慢、橙白。

处理:canvas 实时绘制。

输出:预览与导出代码/图。结果以浏览器实时计算为准,纯前端本地处理、数据不上传;生成的样式与代码仅作快速产出参考,正式项目请以设计系统、规范与浏览器实测为准。

❓ 常见问题(FAQ)

粒子多了卡吗?
数量越大越耗 GPU/CPU,移动端建议降低数量。结果以浏览器实时计算为准,纯前端本地处理、数据不上传;生成的样式与代码仅作快速产出参考,正式项目请以设计系统、规范与浏览器实测为准。
生成的代码/图片能直接用吗?
可直接复制使用,建议粘到项目后在浏览器实测微调;本工具只生成不托管。
会保存或上传我的内容吗?
结果以浏览器实时计算为准,纯前端本地处理、数据不上传;生成的样式与代码仅作快速产出参考,正式项目请以设计系统、规范与浏览器实测为准。

Formula & Standard References

Item Formula / Note Source / Standard
Keyframe interpolation transform and opacity are interpolated between the 0% / 20% / 100% keyframes on the compositor thread CSS Animations Level 1
HiDPI friendly particles are drawn from CSS variables and clip-path, so they render in device-independent pixels without any DPR canvas scaling CSS Shapes / clip-path
Staggered phases a negative animation-delay offsets particles within the same animation period so the batch does not rise in lockstep CSS Animations Level 1
⚠️ 使用说明与注意事项