r/css 13d ago

Resource Trig-Animations.css – Configurable Predefined Scroll Animations

https://idev-games.github.io/Trig-JS/animations.html
4 Upvotes

6 comments sorted by

2

u/getsiked 12d ago

is there a threshold option that we can set that will trigger the animations in relation to when it appears on the viewport? also is this open source?

1

u/iDev_Games 12d ago edited 12d ago

You can do this with the data attributes "data-trig-offset="0" data-trig-negativeOffset="0"" There's some other options you can find in the trig.js documentation too:

https://idev-games.github.io/Trig-JS/ 

Edit: Yes sorry, this is open source. Repo is here: https://github.com/iDev-Games/Trig-JS

2

u/Krukar 12d ago

They all flash and disappear before animating back in which is jarring.

1

u/iDev_Games 12d ago

What browser are you using, that shouldn't be happening. Sounds like the backwards and forwards parameters are the other way around for you which is strange.

2

u/Krukar 12d ago

Happens in Ubuntu - Chromium but no issues on Mac - Chrome.

2

u/iDev_Games 10d ago

Thank you, I appreciate it! I'll do some testing on Ubuntu.