Answer the question
In order to leave comments, you need to log in
Adding elements from json and then removing them?
You need to do something like a vertical running line, in which elements from JSON are dynamically added and after the element leaves the container, they are deleted.
Can you tell me how this can be implemented?
What I have: https://codepen.io/anon/pen/JNWMMb
Answer the question
In order to leave comments, you need to log in
It is known how many maximum blocks are visible at the same time. Keep blocks in an array. Insert and remove them from the DOM - only those 2 blocks that are visible are present in the page at any time.
Can be done in JS, but the animation twitches .
But better option with CSS animation . Two animations are used here - entry into the frame, and exit. At the end of each animation, the transitionend event is fired . Upon completion of the entry, it is time to start the exit of yourself and the entry of the next one.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question