L
L
lavezzi12016-04-15 10:24:16
css
lavezzi1, 2016-04-15 10:24:16

How to make a looped animation?

There is a block with an image on it through css background-image, it needs to be animated so that the picture moves to the right all the time, I did this through css animation like this:

@keyframes loading {
  0% {
    background-position: 0px;
  }
  100% {
    background-position: 100px;
  }
}

animation: loading 1s infinite;
But it twitches, it is clear that the keyframe breaks. How to fix?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Sofichev, 2016-04-15
@lavezzi1

codepen.io/THISISHAPPI/pen/RaMmYq

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question