loktar00 / JQuery-Snowfall

Makes it snow on any web page or specific element.
http://loktar00.github.io/JQuery-Snowfall/
712 stars 221 forks source link

Different opacity on each flake #26

Open saimana opened 9 years ago

saimana commented 9 years ago

Hi I needed a effect of different opacity on each flake and i made it, but will be useful if you add it as an options in the plugin: { minOpacity: 0.2, maxOpacity:1 }

I do it with css:

.snowfall-flakes:nth-child(even) { opacity:0.5; }
.snowfall-flakes:nth-child(3n) { opacity:0.8; }
.snowfall-flakes:nth-child(4n) { opacity:0.2; }
.snowfall-flakes:nth-child(10n) { opacity:0.1; }

Thank you for developing this plugin.

loktar00 commented 9 years ago

:+1: Good idea the only thing I would change is just dynamically add/change the opacity on snowflake creation in the JS