D
D
Dmitry Petrov2015-04-24 20:30:22
css
Dmitry Petrov, 2015-04-24 20:30:22

How to start CSS animation when an object is visible?

Hello. There is this structure:

<div>
    <img>
</div>

Help me understand: how to make the animation start only when it has the "display" property not set to "none"?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Andrey Chernyshev, 2015-04-24
@delch

What same changes to it display?! At the same moment, add an animation class to it.

S
Sergey, 2015-04-24
@UDAV99

mynameismatthieu.com/WOW

D
de_cubik, 2015-04-24
@de_cubik

As an option, check the style of the element using JS, and assign it a class with animation.

N
nurise, 2015-04-25
@nurise

codepen.io/nurislamov/pen/qdEORY
you can do this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question