N
N
Nikita Kit2016-05-24 00:55:40
css
Nikita Kit, 2016-05-24 00:55:40

How to delay the appearance of elements on the page using CSS?

there is a block on the page, the appearance of which I want to set 2 seconds after loading.
The keyframe does its job, but after the animation plays, the element disappears again. If you set a strict opacity 1 to an element in its properties, then it appears on the page immediately after loading, then after the animation-delay value, the appearance animation is played.
Is it possible to make it take the value opacity 1 after the animation is played, and before - opacity 0. Or will I have to resort to the Jedi power of setTimeout?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Strukov, 2016-05-24
@ShadowOfCasper

Can be done via animation-fill-mode: both

S
Sergey Sofichev, 2016-05-24
@thisishappi

scrollReveal.js is very + simple

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question