background-size with background-position doesn't scale the position?

前端 未结 6 1668
轮回少年
轮回少年 2021-02-05 13:16

I\'ve a sprite of 62 images of 91 * 91px, which makes the whole thing 91 * 5642 px. They\'re displayed in sort of a dynamic grid that grows and shrinks depending on user/pointer

6条回答
  •  野性不改
    2021-02-05 14:07

    it's actually pretty simple, just use percentage position.

    background-position: 0 3.28%;
    

    http://jsfiddle.net/g4RQx/18/

提交回复
热议问题