需要引入的css和js文件:
<link type="text/css" href="${rsp}/resources/css/wechat/peachBlossom/bootstrap.min.css" rel="stylesheet">
<script type="text/javascript" src="${rsp}/resources/js/wechat/send/join/jquery.min.js"></script><script type="text/javascript" src="${rsp}/resources/js/wechat/peachBlossom/bootstrap.js"></script>
<script type="text/javascript" src="${rsp}/resources/js/wechat/peachBlossom/clickspark.min.js"></script>
实现代码:
<script>
$(document).ready(function () {
setTimeout(function(){
setInterval(function(){
clickSpark.setParticleCount(100);
clickSpark.setParticleSize(32);
clickSpark.setParticleSpeed(10);
clickSpark.setParticleImagePath('');
clickSpark.fireParticles($('.upper_heart'));
clickSpark.setParticleDuration(400);
},3000);
},1500)
});
</script>