Restart CSS/SVG Animations on Click

preview_player
Показать описание
In this video, I show you step by step how to set up CSS and SVG animations to restart in sequence on click using a little bit of jQuery.

I go through several different steps so to make things easier, you can skip ahead:

CSS3 Code Implementation: 3:48
jQuery Code Implementation: 11:49
Рекомендации по теме
Комментарии
Автор

Now I can do a lot more without having to design it all. I'm going to watch this a few more times. I've got to daydream about all the stuff I can make move. Do more vids. You're a great teacher.

DallasVocals
Автор

Just started to learn about SVGs. This is impressive. Thank you for the well made tutorial.

snoeg
Автор

Also you can use custom properties for the same kind of stagger you get with SMIL! Like for the sun duration var(—_duration) then welcome can be animation-delay: calc(var(—_duration) + 2s)

I adore custom properties!!

clevermissfox
Автор

Hello Brotherman

May you please kindly do a tutorial on how to restart the animation using vanilla JS.

nkululekomthimkulu
Автор

In another video I saw you added a viewBox as well but in that video you just took off the width and height completely. In this one you made them both 100%; is that because this one has a wrapping div and the other one didn’t (I believe it was with the car and lift and little worker men)? Could you just remove width and height attr from this one?

clevermissfox