A
A
Alexey Goncharov2021-02-19 11:51:54
css
Alexey Goncharov, 2021-02-19 11:51:54

How is animation done on the site?

Hello, can you tell me how animation is done on the site in general? And what are the ways in general to make animation on the page. Need to use js, canvas, svg? How?

I want to add this animation to my site. So that the cookie flies from the right edge to the middle of the site and stops (while spinning while flying out).

How can I do it? What is the best way to do this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dima, 2021-02-19
@qpz

Everything is quite simple. If you need animation on click, then use JS to hang an event on the button in which you create or make visible (display block) an element with animation. The element itself can be a regular image or svg. Animate this element with CSS. There are a lot of possibilities, you can do anything, here is a rough example

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question