Animated .GIF vs Spritesheet + JS/CSS

后端 未结 8 507
忘了有多久
忘了有多久 2020-12-23 11:51

Which will scale best for performance, file-size, (and my sanity): Animated .gifs or a spritesheet with animations using CSS (and JS when need be)?

File

8条回答
  •  忘掉有多难
    2020-12-23 12:26

    I'd take a look at this:

    http://adamducker.com/blog/7/animated-gif-for-css-sprites/

    I personally think you'd be crazy to use a spritesheet, but i guess it depends on how many animated gifs you'd have to bring over otherwise

    I don't know what your limitations are, but here's a fiddle using CSS3 step() to animate a spritesheet:

    http://jsfiddle.net/simurai/CGmCe/

提交回复
热议问题