Skip to content

Instantly share code, notes, and snippets.

@edelans
Last active December 18, 2017 19:52
Show Gist options
  • Save edelans/ddbda07f94deecb5fb5c30787ce519b0 to your computer and use it in GitHub Desktop.
Save edelans/ddbda07f94deecb5fb5c30787ce519b0 to your computer and use it in GitHub Desktop.
CSS only snow animation. All credits goes to https://carloseo.com/let-it-snow-css-animation/
.snow{
background-image:
url(https://user-images.githubusercontent.com/2805640/34124910-ec43e9a2-e434-11e7-85e5-0caebbe8ae94.png),
url(https://user-images.githubusercontent.com/2805640/34124916-f2bd028c-e434-11e7-8cf4-71d50265798f.png),
url(https://user-images.githubusercontent.com/2805640/34124918-f435eb42-e434-11e7-85c6-576e94b90377.png);
width: 100%;
height:100%;
position: absoulute;
top: 0;
left: 0;
z-index:1;
animation: snow 20s linear infinite;
}
@keyframes snow {
from {background-position: 0px 0px, 0px 0px, 0px 0px;}
to {background-position: 500px 1000px, 200px 400px, -100px 300px;}
}
<div class="snow"> </div>
@edelans
Copy link
Author

edelans commented Dec 18, 2017

images :

snow

snow1

snow2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment