Skip to content

Instantly share code, notes, and snippets.

@mishelen
Created June 11, 2015 22:18
Show Gist options
  • Select an option

  • Save mishelen/45e1f79731a55d9c86e0 to your computer and use it in GitHub Desktop.

Select an option

Save mishelen/45e1f79731a55d9c86e0 to your computer and use it in GitHub Desktop.
The effect is similar to the old Zoetrope devices, which presented a series of illustrations in sequence around a cylinder. Instead of a cylinder, we display a flat series of images inside an element.
.fave {
width: 100px;
height: 100px;
background: url(images/sprite.png) no-repeat;
background-position: 0 0;
}
.fave:hover {
background-position: -5500px 0;
transition: background 1s steps(55);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment