I have a spritesheet with dimensions 3x5 and I want to create an animation using the step() function in CSS.
Most of the CSS examples available online are for sprite sheets that are 1xnumFrames, but mine is different. I am seeking a purely CSS solution for my 3x5 sprite sheet.
I attempted to use the provided code but encountered a problem where instead of stepping between frames, the animation appeared as a sliding transition from one frame to the next.
CSS
@-webkit-keyframes crystal-wave {
// keyframe values here
}
.crystal-waving {
// styles and animations here
}
HTML
<div class="crystal-waving" style="width:276px; height:372px;"></div>
Here is the texture atlas XML:
<TextureAtlas imagePath="button_cc.png">
<SubTexture name="Button_CC0000" x="0" y="0" width="270" height="314"/>
// more SubTexture elements here
</TextureAtlas>