js代码
<script src="js/jquery-1.11.0.min.js" type="text/javascript"></script> <script src="dist/jquery-canvas-sparkles.js"></script> <script type="text/javascript"> $(".demo1").sparkle({ color: "#FFFFFF", count: 30, overlap: 0, speed: 1, minSize: 4, maxSize: 7, direction: "both" }); $(".demo2").sparkle({ color: "rainbow", count: 50, overlap: 0, speed: 1.5, minSize: 5, maxSize: 10, direction: "both" }); $(".demo3").sparkle({ color: "rainbow", count: 100, overlap: 0, speed: 2, minSize: 5, maxSize: 15, direction: "both" }); </script>