jparticles
Version:
A succinct, efficient, and lightweight Canvas plugin library for building some cool particle effects.
36 lines (35 loc) • 996 B
HTML
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link rel="stylesheet" href="css/style.css">
<style>
#instance .demo {
background: url(./img/merry_christmas.jpg) no-repeat;
background-size: 100% 100%;
}
</style>
</head>
<body>
<div id="instance">
<div class="demo"></div>
<div class="btn-box">
<button class="btn btn-primary" type="button" data-open>
open
</button>
<button class="btn btn-danger" type="button" data-pause>
pause
</button>
</div>
</div>
<script src="../production/jparticles.js"></script>
<script src="../production/snow.js"></script>
<script src="js/event.js"></script>
<script>
bind('#instance', function () {
return new JParticles.snow('#instance .demo');
});
</script>
</body>
</html>