3 ms·
Ask HN: Google search PNG question
On a Google search results page in developer tools it has this .png file (www.google.com/images/nav_logo242.png)
And I have been wondering two things. 1. how do they use different parts of a single png in different parts of the web page? And does the checkered background of the png mean it's transparent?
- slater 9y agoThat link doesn't work for me, but: 1. CSS's background-position, probably. 2. Dependent on your browser; if you're using Google Chrome: Yes.
- ParameterOne 9y agosorry,updated the link, was missing the www.
- Safety1stClyde 9y agoThis is a CSS sprite. See https://www.w3schools.com/Css/css_image_sprites.asp https://www.w3schools.com/Css/css_image_sprites.asp
- ParameterOne 9y agoThank you.