jlmakes / scrollreveal

Animate elements as they scroll into view.
https://scrollrevealjs.org/
22.3k stars 2.26k forks source link

How to scale up and down #526

Closed lovecoding-git closed 3 years ago

lovecoding-git commented 3 years ago

Hi, Thank you for such great package. My one question is how to apply multi-step scale?

For example I want to put breathing effect. scale(1)->scale(1.01) -> scale(0.95) 0s------------0.5s------------1s How can I do it?

jlmakes commented 3 years ago

There's presently no way to define multi-step transitions. I was thinking you might try to use an easing function with "overshoot", something like cubic-bezier(0, 0, 0.5, 1.20). Thanks for the idea, and good luck!

lovecoding-git commented 3 years ago

@jlmakes Thank you for your advice!