Explain CSS sprites, and how you would implement them on a page or site.

An image sprite is a collection of images put into a single image.

A web page with many images can take a long time to load and generates multiple server requests. Using image sprites will reduce the number of server requests and save bandwidth.

$ npm install sprity -g

$ sprity ./output-directory/ ./input-directory/*.png

https://css-tricks.com/css-sprites/

results matching ""

    No results matching ""