Connect_logo_6.png 退出
前端视频教程 小程序 众筹源码 python 商城源码 商城模板 响应式模板 中文模板 手机模板 企业源码

作者/代码整理:  (转载请附加本文地址,带有“js原生”字样的谢绝转载) 发布日期:2018-08-01
一款基于jQuery跟html5 Canvas实现的鼠标悬停图片星星闪烁动画特效,可以自定义星星动画的参数。


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>