Skip to content

A JavaScript wrapper for PavelTheCoder's CSSnowflakes to activate on demand and control the amount.

License

Notifications You must be signed in to change notification settings

robsd/js-snowflakes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

js-snowflakes ❄️

A JavaScript wrapper for PavelTheCoder's CSSnowflakes to activate on demand and control the amount.

How to use

  1. Import the css/style.css and js/script.js.

  2. Call the snowstorm(X); function in your own script or assign it to a button with onclick="snowstorm(X);" replacing X with how many snowflakes you want.

Note: There are 2 styles of snowflake used for each iteration and .

Bonus tip

Combine it with my countdown script and have it snow (virtually) on the 25th!

See my christmas countdown or advent calendar scripts for an example.

Demo

https://robsd.github.io/js-snowflakes

Support my work

If you like this repo or used any of the code, please star ⭐ it and consider supporting me below...

ko-fi