I. Methods of Use
The Particle animation Library plugin is very simple to use, first to introduce the Particles.js file in the page.
<script src= "Js/particles.js" ></script>
Use a div in the page as a container to place particles.
<div id= "Particles-js" ></div>
You can then invoke the particle plug-in as follows:
Particlesjs (' Particles-js ', {
Particles: {
Color: ' #fff ',
Shape: ' Circle ',
Opacity:1,
Size:4,
Size_random:true,
nb:150,
Line_linked: {
Enable_auto:true,
DISTANCE:100,
Color: ' #fff ',
Opacity:1,
Width:1,
Condensed_mode: {
Enable:false,
rotatex:600,
rotatey:600
}
},
anim:{
Enable:true,
Speed:1
}
},
Interactivity: {
Enable:true,
Mouse: {
distance:250
},
detect_on: ' Canvas ',
Mode: ' Grab ',
Line_linked: {
Opacity:. 5
},
Events: {
OnClick: {
Enable:true,
Mode: ' Push ',
Nb:4
}
}
},
Retina_detect:true
});
Keymob Mobile AD Alliance focuses on mobile advertising, is committed to creating the best mobile advertising revenue for application developers, good service, the SDK is stable, is the application developer's preferred mobile advertising alliance.
HTML5 add lightweight cool JS Particle Animation Library Plugin Tutorial