Magic Dust是纯html基于粒子效果的解决方案,主要好处是容易使用,高性能、响应和轻量级的插件。2.9 kb,您可以添加html元素效果。只需要几行代码就可以显示在你的页面。先调用插件 调用示例$(function() { WinterFlat(); }); function WinterFlat() { magicDust.stop("md_magicDust"); magicDust.stop("md_background"); magicDust.stop("md_logo"); magicDust.start({ canvas: "md_magicDust", count: 25, canvasHeight: "150px", canvasWidth: "265px", maxRadius: 3, collectorHeight: 30, minSpeed: 5, maxSpeed: 20, startColor: "rgba(255, 255, 255, 1)", stopColor: "rgba(255, 255, 255, 1)" }); /* Color adjustment */ $("body").addClass("winterFlat"); };

dd:
本文介绍了轻量级的HTML粒子效果插件MagicDust,只需几行代码即可在页面上创建高性能的动态效果。通过实例演示了如何调用和配置插件,以及如何为网站增添冬季主题的扁平风格。
6万+

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



