Describe the process of creating a CSS sprite and its advantages.
Instruction: Explain what a CSS sprite is and why it's beneficial.
Context: This question assesses the candidate's understanding of CSS sprites, a method to reduce the number of HTTP requests for images, and how to implement them.
Updated
Official answer available
Read the opening below, then unlock the full answer and practical guidance.
A CSS sprite places several images into one image resource. Give each display box the size of one region, disable repetition and offset the background so that the required region is visible. Regions need known coordinates; they do not have to be evenly spaced.
This self-contained example uses a two-color SVG sheet that is 32px wide and 16px high:...