"Image rain" effect on CSS3, Jquery or Javascript. How to do?

Asked

Viewed 1,034 times

1

What I got:

-A div with class "background-bg", whose image fills the entire screen.

<div class"background-bg"></div>

What I want to do:

-Create a "rain/snow" effect (falling type) using another 20 small images(120x120).

Expected result:

1-When the page is loaded, the background image( "background-bg" class) will cover the entire screen;

.background-bg{
  background-image: url("img/background-bg.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
}
.background-bg{
  width: 100%;
  height: 100%;
  
}

2-After 5 seconds, a "rain" of small images should happen infinitely.

Searching on the web I found snow effects here, here, here and here.

I want something very similar, with 20 images and not just 1.

Can someone tell me how I can do it ?

  • The demo of the first link uses a plugin that allows one more image. Take a look at his javascript file. You can create an array of images that will make the effect. graphics: ['images/flake2.png', 'images/flake.png']

  • Okay.. I’ll take a look.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.