css3 - CSS Keyframe Animation Similar to Stop Motion -


i need use keyframe animations move background-position of sprite sheet. however, not want animations, want hard frame frame look, similar gif.

any ideas how achieve this?

thanks much!

yes, can achieve more beautifully, javascript

css :

@-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; } 

html :

<div class='image'></div> 

demo : http://jsbin.com/obunen/1/edit


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -