D
D
Daniil Ivanov2021-07-21 21:38:59
css
Daniil Ivanov, 2021-07-21 21:38:59

How to set animation time in JS?

Help me please. I started making a website, but js came in handy (I don’t know it at all) and I don’t know how to make an animation when opening a link so that it opens at a given time

https://jsfiddle.net/ufhkd9xt/1/

here is my code

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ravshan Khalimov, 2021-07-21
@danilious

https://jsfiddle.net/Ravshanbek778/ychqvptg/
There is such a crooked way (but it's not good)
In general, you need to use animationkeyframes (or you can use setTimeout) if you want to use pureJS
And if there is a possibility of jquery, then there is already built-in
https:/ /api.jquery.com/show/#show
https://api.jquery.com/hide/#hide

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question