Home > Web Front-end > HTML Tutorial > Realistic fireworks special effects plug-in based on HTML5 canvas

Realistic fireworks special effects plug-in based on HTML5 canvas

黄舟
Release: 2017-01-18 14:24:14
Original
1691 people have browsed it

Brief Tutorial

jquery-fireworks is a jQuery plug-in for realistic fireworks special effects based on HTML5 Canvas. The plugin is simple to use and freely configurable. It can generate realistic fireworks effects in a div container.

Usage method

Introduce jquery and jquery.fireworks.js files into the page.

<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.fireworks.js"></script>
Copy after login

HTML structure

Use a

element as a container for fireworks.

<div class="demo"></div>
Copy after login

Initialization plug-in

After the page DOM element is loaded, you can initialize the fireworks special effects plug-in through the fireworks() method

$(&#39;.demo&#39;).fireworks({ 
  sound: true, // 声音效果
  opacity: 0.9, 
  width: &#39;100%&#39;, 
  height: &#39;100%&#39;
});
Copy after login

The github of the HTML5 canvas fireworks special effects plug-in The address is: https://github.com/mgrigajtis/jquery-fireworks

The above is the content of the realistic fireworks special effects plug-in based on HTML5 canvas. For more related content, please pay attention to the PHP Chinese website (www.php.cn )!


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template