Giter Site home page Giter Site logo

css3-adaptive-sprite's Introduction

CSS3技术-雪碧图自适应方案

精灵动画实现的手段太多了,比如定时器的帧动画,CSS3的animation动画,canvas动画
经过我大量实践,我项目使用中最为理想的方式:通过CSS3关键帧运行动画

但是不管如何实现,都需要解决雪碧图的自适应分辨问题
目前来说,雪碧图常规的方案一般会做几套不同大小的图去适应不同的设备尺寸

如果只采用一套图如何做自适应处理?
经过研究在移动端可以采用background-size的处理达到这个目的

如何做大量的关键帧动画?靠写死
通过动态脚本生成
如果动画多写一堆的样式就是一个蛋疼的事
所以这里我建议可以采用脚本生成关键帧
通过内联style加载,这样的处理是极好的。

###blogs: http://www.cnblogs.com/aaronjs/p/4744014.html


css3-adaptive-sprite's People

Contributors

jsaaron avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.