UNPKG

jparticles

Version:

A succinct, efficient, and lightweight Canvas plugin library for building some cool particle effects.

43 lines (42 loc) 1.08 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <link rel="stylesheet" href="css/style.css"> <style> #demo{ width: 900px; height: 600px; margin: 50px auto; border: 1px solid #ccc; } .btn-box{ text-align: center; } .btn{ font-size: 20px; } </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="js/event.js"></script> <script src="../production/jparticles.all.js"></script> <script> bind('#instance', function () { return new JParticles.particle('#instance .demo'); }); </script> </body> </html>