简体   繁体   中英

Why does Google include a lot of icons inside their result page's logo? Is it an optimization technique?

A moment ago I found out that the Google logo image of the results page contains a lot of icons (you can see this simply by dragging or inspecting the logo).

I don't think this is a bug so, what's its purpose?
Is it an optimization technique? If so, how it works?

在此输入图像描述

It's called a CSS sprite. It is a performance technique as requesting many small images is costly as it requires a lot of HTTP requests. This only requires one.

Here is a short guide on how to make and use them.

In short: CSS Sprites are a means of combining multiple images into a single image file for use on a website, to help with performance.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM