½ºÇÁ¶óÀÌÆ® ½ÃÆ®¸¦ css·Î»ç¿ëÇÏ¿© ¿òÁ÷ÀÌ´Â À̹ÌÁö Á¦ÀÛÀÔ´Ï´Ù.
¼Ò½º´Ù¿î·Îµå ¶Ç´Â µ¥¸ðÆäÀÌÁö¸¦ ÅëÇØ È®ÀÎÇØ º¸½Ç ¼ö ÀÖ½À´Ï´Ù.
HTML
<img src="http://s.cdpn.io/79/sprite-steps.png" />
<div class="hi"></div>
CSS
.hi {
width: 50px;
height: 72px;
background-image: url("http://s.cdpn.io/79/sprite-steps.png");
-webkit-animation: play .8s steps(10) infinite;
-moz-animation: play .8s steps(10) infinite;
-ms-animation: play .8s steps(10) infinite;
-o-animation: play .8s steps(10) infinite;
animation: play .8s steps(10) infinite;
}
@-webkit-keyframes play {
from { background-position: 0px; }
to { background-position: -500px; }
}
@-moz-keyframes play {
from { background-position: 0px; }
to { background-position: -500px; }
}
@-ms-keyframes play {
from { background-position: 0px; }
to { background-position: -500px; }
}
@-o-keyframes play {
from { background-position: 0px; }
to { background-position: -500px; }
}
@keyframes play {
from { background-position: 0px; }
to { background-position: -500px; }
}
|