Skip to content

Instantly share code, notes, and snippets.

@ajcrites
Last active December 15, 2015 13:08
Show Gist options
  • Save ajcrites/5264800 to your computer and use it in GitHub Desktop.
Save ajcrites/5264800 to your computer and use it in GitHub Desktop.
Image explanation
span {
display: inline-block;
background: url(IMAGE);
width: 156px;
height: 154px;
border: 1px solid blue;
}
span {
display: inline-block;
background-image: url(IMAGE);
background-position: -4px -3px;
width: 153px;
height: 150px;
border: 1px solid blue;
}
span:hover {
background-position: right 0;
}
span:hover {
background-position: -158px 0;
}
span:hover { /* HOVERED */
background-position: -39px 0;
}
span:active { /* CLICKED */
background-position: -78px 0;
}
span {
display: inline-block;
background-image: url(prev-65x75.png);
width: 65px;
height: 75px;
}
span:hover {
background-position: right 0;
}
span:active {
background-position: 0 bottom;
}
span[disabled], span[disabled]:hover, span[disabled]:active {
background-position: right bottom;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment