Is using the logo tag in sprites good or bad?

后端 未结 14 629
攒了一身酷
攒了一身酷 2021-02-05 05:31

When building web pages, one of my colleagues displays any logo using the CSS background-image property, rather than embedding the image using an HTML t

14条回答
  •  再見小時候
    2021-02-05 05:40

    Sprites allow you to reduce the number of requests. This will only work however if it's all in one stylesheet.

    Ex: the first tag that requires the sprite is called as a background image, and then is called again in a different tag in the same stylesheet. If they are in separate stylesheets, they will be requested more than once.

    Little article: http://webmasterformat.com/blog/css-sprites

提交回复
热议问题