While adding animated snow to a webpage , whether it's our own or a client's, might sound like an outdated design practice, the animation we're presenting here is incredibly elegant. What's more, it doesn't require JavaScript; it's simply CSS3.
The first thing to do is take a look at the animation.
It looks pretty good, right? To put it into practice, we just need to create three images with white dots and animate them using the CSS3 @keyframes property as follows:
/*Keyframes*/
@keyframes snow {
0% {background-position: 0px 0px;}
100% {background-position: 500px 1000px, 400px 400px, 300px 300px;}
}
Adding the different prefixes for the different browsers , then setting them for our body:
body {
background-color: #6b92b9;
background-image: url('snow.png'), url('snow3.png'), url('snow2.png');
animation: snow 20s linear infinite;
}
Also adding the necessary prefixes. The full procedure with detailed explanations, courtesy of Joshua Johnson, can be found on his blog.
More information - CSS3 Gradient Generator, CSS3 Gradient Generator
Source - design shack