Skip to content

Mario-Duarte/floating_particles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Random Floating Particles

Create random floating particles using js and css, create up to 100 particles with random initial positions, sizes and delays using javascript. Change shape and colour of particle on the scss, 100 different and randomly generated animations that are applied to each particle created resulting on a different result every time the page is loaded.

[Live Demo] (https://jsfiddle.net/MarioDesigns/suLfkpf4/)

Dependencies

###How to use

The html structure:

<div class="particles-wrapper">
  <div  class="particles floating-bubbles"></div>
</div>

All particles created via javascript will be appended to the <div> with the class .particles, the <div class="particles-wrapper"> can be used to determinate the size of the area with the particles.

To create the particles just create a variable and assign it the following:

var floatingBubbles = new createParticles($numberOfParticles, $particlesMaxSize, $particlesMinSize, $particlesMaxLeftDistance, $particlesMaxBottomDistance, $particlesMaxDelay);
floatingBubbles.getParticles();

About

Small plugin to create random floating particles

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published