when not to use CSS sprites?

后端 未结 7 1129
一整个雨季
一整个雨季 2021-02-12 19:43

I want to know when not to use CSS sprites. CSS sprites works great, but are there any occasions when they create a lot of headaches?

7条回答
  •  北荒
    北荒 (楼主)
    2021-02-12 20:31

    We had a tough time when we wanted to position the image dynamically.

    background-image: url(../images/a.gif);
    background-repeat: no-repeat;
    background-position: left bottom;
    

    This is tricky (if not impossible) to do using a sprite.

提交回复
热议问题