Loading

Quipoin Menu

Learn • Practice • Grow

css / Image sprites
interview

Q1. What is an image sprite?
An image sprite combines multiple images into one file to reduce HTTP requests and improve loading speed.

Q2. How do you use CSS sprites?
Set element dimensions, use background-image to show sprite, and background-position to display correct part.

Q3. What's the benefit of using sprites?
Fewer HTTP requests, faster page load, and smoother hover effects since image is already loaded.

Q4. How do you calculate background-position?
If icons are 32px each, first at 0 0, second at -32px 0, third at -64px 0, etc.

Q5. Can sprites have hover effects?
Yes, change background-position on hover to show different part of sprite.