jeudi 25 décembre 2014

How Would I Make This Animation?


So I've got this idea. Basically, I want a circle div in the center. And I want a bunch of little lines coming off the div, kind of like rays of light coming off the Sun (that's supposed to be what it represents). How would I do that? Would I use JavaScript or CSS3 Animations?


I could probably do it right now, but it would get incredibly laggy after a couple minutes, because the lines wouldn't delete themselves after they left the page. I don't really know how to do that. Also, it just wouldn't look very good, because I have a feeling my methods would be pretty primitive.


The tricky bit is that most of the lines will be travelling at an angle of some form (because rays of light come off at all 360 degrees of the sun), meaning I'd have to set the margin-top and the margin-left or margin-right at the same time in some way that makes them go strait in exactly the direction that I want... This is probably a pretty complicated animation to do, isn't it...


Anyone know of some tutorials to point me to that would help with this? I hope this made sense...





Aucun commentaire:

Enregistrer un commentaire