CSS Image Sprites

Download css eBook


  • //Using background-position
    background: url("sprite-image.png");
    background-position: -20px 50px;
  • //Background property shorthand
    background: url("sprite-image.png") -20px 50px;


For some use cases, sprites are slowly falling out of favor, being replaced by icon webfonts or SVG images.

Related Examples


96 Contributors: 5
Thursday, November 10, 2016
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook