Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Yes, but you can achieve this more beautifully, with JavaScript</p> <p>CSS : </p> <pre><code>@-webkit-keyframes sprite { 0% { background-position: 0px 0px; } 25% { background-position: 0px 0px; } 25.1% { background-position: -200px 0px; } 50% { background-position: -200px 0px; } 50.1% { background-position: -400px 0px; } 75% { background-position: -400px 0px; } 75.1% { background-position: -400px -200px; } 99.9% { background-position: -400px -200px; } 100% { background-position: 0px 0px; } } @-moz-keyframes sprite { 0% { background-position: 0px 0px; } 25% { background-position: 0px 0px; } 25.1% { background-position: -200px 0px; } 50% { background-position: -200px 0px; } 50.1% { background-position: -400px 0px; } 75% { background-position: -400px 0px; } 75.1% { background-position: -400px -200px; } 99.9% { background-position: -400px -200px; } 100% { background-position: 0px 0px; } } @-o-keyframes sprite { 0% { background-position: 0px 0px; } 25% { background-position: 0px 0px; } 25.1% { background-position: -200px 0px; } 50% { background-position: -200px 0px; } 50.1% { background-position: -400px 0px; } 75% { background-position: -400px 0px; } 75.1% { background-position: -400px -200px; } 99.9% { background-position: -400px -200px; } 100% { background-position: 0px 0px; } } @keyframes sprite { 0% { background-position: 0px 0px; } 25% { background-position: 0px 0px; } 25.1% { background-position: -200px 0px; } 50% { background-position: -200px 0px; } 50.1% { background-position: -400px 0px; } 75% { background-position: -400px 0px; } 75.1% { background-position: -400px -200px; } 99.9% { background-position: -400px -200px; } 100% { background-position: 0px 0px; } } div.image { background: url('http://bponline.amcham.gr/wp-content%5Cuploads/2011/12/out_of_the_box.jpg'); width: 200px; height: 200px; -webkit-animation: 5s sprite infinite; -moz-animation: 5s sprite infinite; -o-animation: 5s sprite infinite; animation: 5s sprite infinite; } </code></pre> <p>HTML :</p> <pre><code>&lt;div class='image'&gt;&lt;/div&gt; </code></pre> <p>Demo : <a href="http://jsbin.com/obunen/1/edit" rel="nofollow">http://jsbin.com/obunen/1/edit</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload