robsd / js-snowflakes

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

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

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

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

License:MIT License


Languages

Language:HTML 69.8%Language:JavaScript 30.2%