Skip to content

Instantly share code, notes, and snippets.

@Tom-Alexander
Created October 16, 2015 03:28
Show Gist options
  • Save Tom-Alexander/d5759c107960033f83f6 to your computer and use it in GitHub Desktop.
Save Tom-Alexander/d5759c107960033f83f6 to your computer and use it in GitHub Desktop.
.sprite-animation(@name, @frame-width, @frame-height, @url, @frame-count, @sprite-width, @duration) {
width: @frame-width;
height: @frame-height;
display: block;
background: url(@url) left center;
animation: @name @duration steps(@frame-count) infinite;
@keyframes @name {
100% {
background-position: @sprite-width;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment