Is using the logo tag in sprites good or bad?

后端 未结 14 626
攒了一身酷
攒了一身酷 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:38

    I would recommend using the IMG tag for the logo with an alt text and combining all other images as a spritesheet. I believe using spritesheets is only truly useful when you have more than 3 images. Read Rohan Patil's answer above for why thats the case.

    My main question is if you have 3 or more logos like LOGO in footer, subpage etc. So, what is a better way?

    In that case, yes, add the main logo with an IMG tag and use sprites for the rest.

提交回复
热议问题