What is a sprite? How is it applied using CSS? What is the benefit?
Experience Level: Medior
Tags: CSS
Answer
CSS spirite is a preformance optimization technique that combines multiple images into a single image called a spirite sheet or title set. Spirites reduce network congestion by reducing the number of downloads needed to render a web page.
CSS spirite sheet work: marge several images into a single spirit sheet, placing them in the grid-like pattern. When particular image is required, the CSS refefences the spirit sheet, offsets it by the index of the desired spirite, then defines the size of the sirite in pixels.
Related CSS job interview questions
How do you clear a floated element?
CSS JuniorHow do I center block-elements with CSS1?
CSS JuniorWhy was the decision made to make padding apply outside of the width of a 'box' rather than inside, which would seem to make more sense?
CSS MediorWhich browsers support CSS?
CSS JuniorName three ways to define a color in CSS?
CSS Junior