CSS Image Sprites
suggest changeSyntax
- //Using background-position
background: url(“sprite-image.png”);
background-position: -20px 50px;
- //Background property shorthand
background: url(“sprite-image.png”) -20px 50px;
Remarks
For some use cases, sprites are slowly falling out of favor, being replaced by icon webfonts or SVG images.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents